Text { public static boolean containsEvilSpecialChar(String stringToCheck) { return CharMatcher.anyOf("%<>'\"").countIn(stringToCheck) > 0; }  static String removeLast(String s); static String generateHash(String key); static String capitalize(String s); static String matchMax(String left, String right); static boolean containsEvilSpecialChar(String stringToCheck); static String containingString(String str, String prefix, String suffix);  }
@Test public void testContainsEvilSpecialChar() { assertThat(Text.containsEvilSpecialChar("abc , def"), is(false)); assertThat(Text.containsEvilSpecialChar("abc > def"), is(true)); assertThat(Text.containsEvilSpecialChar("abc < def"), is(true)); assertThat(Text.containsEvilSpecialChar("abc % def"), is(true)); assertThat(Text.containsEvilSpecialChar("abc ' def"), is(true)); assertThat(Text.containsEvilSpecialChar("abc \" def"), is(true)); }