### Question:
B2StringUtil { public static boolean startsWithIgnoreCase(String all, String possiblePrefix) { if (all == null || possiblePrefix == null) { return false; } if (all.length() < possiblePrefix.length()) { return false; } final String prefix = all.substring(0, possiblePrefix.length()); return prefix.equalsIgnoreCase(possiblePrefix); } B2StringUtil(); static String percentEncode(String s); static String percentDecode(String s); static int decimalSubstringToInt(String s, int startIndex, int endIndex); static boolean decimalNumberInRange(String str, int offset, int length,
                                               int minInclusive, int maxInclusive); static String join(String delimiter, Object[] objects); static byte [] getUtf8Bytes(String str); static String toHexString(byte[] b); static String underscoresToCamelCase(String orig, boolean capitalizeFirstLetter); static boolean startsWithIgnoreCase(String all, String possiblePrefix); static final String UTF8; }### Answer:
@Test public void testStartsWithIgnoreCase() { assertFalse(startsWithIgnoreCase(null, "prefix")); assertFalse(startsWithIgnoreCase("all", null)); assertFalse(startsWithIgnoreCase(null, null)); assertFalse(startsWithIgnoreCase("", "prefix")); assertFalse(startsWithIgnoreCase("prefi", "prefix")); assertFalse(startsWithIgnoreCase("real", "fake")); assertFalse(startsWithIgnoreCase("real", "read")); assertTrue(startsWithIgnoreCase("real", "real")); assertTrue(startsWithIgnoreCase("really", "real")); assertTrue(startsWithIgnoreCase("REALly", "real")); assertTrue(startsWithIgnoreCase("REALly", "ReAl")); }