Is there a nicer way to write in jUnit String x = "foo bar"; Assert.assertTrue(x.contains("foo")); 10 Answers 10 Tags: assertjavajunitstring