What is the best way to assert that each element in a collection of strings contains a particular substring?
Something like
List<String> list = Arrays.asList("xyfoobar", "foobarxy", "xyfoobarxy");
assertThat(list, eachElementContains("foobar")); // pass