Token { public static String unescape(String text) { if (text == null) { return null; } if (text.indexOf('\\') < 0) { return text; } int len = text.length(); boolean escaped = false; StringBuilder builder = new StringBuilder(); for (int i = 0; i < len; ++i) { char ch = text.charAt(i); if (ch == '\\' && escaped == false) { escaped = true; continue; } escaped = false; builder.append(ch); } return builder.toString(); }  static boolean isValid(String token); static boolean isSeparator(char ch); static String unquote(String text); static String unescape(String text);  }
@Test public void test005() { unescape(null, null); }
@Test public void test006() { unescape("", ""); }
@Test public void test007() { unescape("abc", "abc"); }
@Test public void test008() { unescape("abc", "ab\\c"); }
@Test public void test009() { unescape("ab\\", "ab\\\\"); }
@Test public void test010() { unescape("ab\\c", "ab\\\\c"); }