StringUtils { public static boolean equals(String s1, String s2, Locale locale) { return Collator.getInstance(locale).equals(s1, s2); } private  StringUtils(); static boolean endsWithIgnoreCase(String a, String b); static boolean matchesIgnoreCase(String a, String b, int posA); static boolean endsWithIgnoreCase(String a, char[] b); static boolean matchesIgnoreCase(String a, char[] b, int posA); static boolean endsWith(String a, char[] b); static boolean matches(String a, char[] b, int posA); static boolean startsWithIgnoreCase(String a, String b); static boolean equals(String s1, String s2, Locale locale); static boolean equals(String s1, String s2, boolean caseSensitive); static int parseIntDef(String s, int def); static String capitalize(String s); static String flatten(String s[]); static String flatten(String s[], String separator); static boolean isNullOrEmpty(String string); static final String EMPTY; }
@Test(dataProvider = "caseSensitiveEquals") public void testCaseSensitiveEquals(String a, String b, boolean expected) { assert StringUtils.equals(a, b, true) == expected; }
@Test(dataProvider = "caseInsensitiveEquals") public void testCaseInsensitiveEquals(String a, String b, boolean expected) { assert StringUtils.equals(a, b, false) == expected; }