Is there a nicer way to write in jUnit
String x = \"foo bar\"; Assert.assertTrue(x.contains(\"foo\"));
Use the new assertThat syntax together with Hamcrest.
assertThat
It is available starting with JUnit 4.4.