### Question:
StringUtils { public static boolean containsAny(String str, Iterable<String> pieces) { if (str == null) { return false; } for (String piece : pieces) { if (piece != null && str.contains(piece)) { return true; } } return false; } private  StringUtils(); static double getDifference(String first, String second); static boolean containsAny(String str, Iterable<String> pieces); static boolean isEmpty(String str); static String formatException(Throwable th); static boolean isInsideString(char needle, String haystack);  }### Answer:
@Test public void shouldFindContainedItem() { String text = "This is a test of containsAny()"; String piece = "test"; boolean result = StringUtils.containsAny(text, asList("some", "words", "that", "do not", "exist", piece)); assertThat(result, equalTo(true)); }
@Test public void shouldReturnFalseIfNoneFound() { String text = "This is a test string"; boolean result = StringUtils.containsAny(text, asList("some", "other", "words", null)); assertThat(result, equalTo(false)); }
@Test public void shouldReturnFalseForNullString() { boolean result = StringUtils.containsAny(null, asList("some", "words", "to", "check")); assertThat(result, equalTo(false)); }