### Question:
StringUtils { public static String removeEnclosingQuotes(String s) { if (s == null) return null; if (isDoubleQuoted(s) || isSingleQuoted(s)) { return s.substring(1, s.length() - 1); } return s; } private  StringUtils(); static int safeLength(String s); static boolean ok(String s); static String formatSQLException(SQLException ex); static int maxWidth(List strings); static boolean isHex(String s); static boolean isHex(char c); static String getPenultimateDirName(String s); static String toShortClassName(String className); static String padRight(String s, int len); static String padLeft(String s, int len); static String[] toLines(String s); static void prepend(String[] ss, String what); static String upperCaseFirstLetter(String s); static String replace(String s, String token, String replace); static String toString(Properties props); static void main(String[] args); static void testUpperCase(); static String makeFilePath(String[] strings, boolean addTrailing); static List<String> parseStringList(String line); static List<String> parseStringList(String line, String sep); static String getProperty(String propName); static String removeChar(String strOrig, char c); static String getStackTrace(Throwable t); static final boolean isToken(String s); static final String stripToken(String s); static String cat(String separator, String... list); static String removeEnclosingQuotes(String s); static String quotePathIfNecessary(String path); static String quotePathIfNecessary(String path, char quoteChar); static String escapeForHtml(String str); static String nvl(String str); static String trimQuotes(String value); static final String NEWLINE; static final String EOL; }### Answer:
@Test public void removeEnclosingQuotes() { String a = "\"hello\""; String b = "'hello'"; String c = "\"hello'"; String d = "\"\"hello"; assertEquals(StringUtils.removeEnclosingQuotes(a), "hello"); assertEquals(StringUtils.removeEnclosingQuotes(b), "hello"); assertEquals(StringUtils.removeEnclosingQuotes(c), "\"hello\'"); assertEquals(StringUtils.removeEnclosingQuotes(d), "\"\"hello"); assertEquals(StringUtils.removeEnclosingQuotes("\""), "\""); assertEquals(StringUtils.removeEnclosingQuotes("'"), "'"); assertEquals(StringUtils.removeEnclosingQuotes("''"), ""); assertEquals(StringUtils.removeEnclosingQuotes("\"\""), ""); assertEquals(StringUtils.removeEnclosingQuotes(""), ""); assertNull(StringUtils.removeEnclosingQuotes(null)); }