HeaderHelper { static String removeQuoteEscapes(String token) { StringBuilder sb = new StringBuilder(); int length = token.length(); for (int i = 0; i < length; i++) { if (charAtIs(token, i, '\\') && charAtIs(token, i + 1, '"')) { continue; } sb.append(token.charAt(i)); } return sb.toString(); } private  HeaderHelper(); static List<AcceptMediaType> createAcceptMediaTypeList(String header); static List<AcceptLanguage> createAcceptedLanguageList(String header); static List<AcceptToken> createAcceptedCharsetList(String header); static List<AcceptToken> createAcceptedEncodingList(String header); static List<Cookie> parseCookies(String cookiesString); static NewCookie parseNewCookie(String newCookieString); static Date parseDateHeader(String header); static String formatDate(Date date); static long getContentLengthLong(MultivaluedMap<String, String> httpHeaders); @SuppressWarnings({"unchecked"}) static String getHeaderAsString(Object o); static String convertToString(Collection<String> collection); static final Comparator<QualityValue> QUALITY_VALUE_COMPARATOR; }
@UseDataProvider("forRemovesQuoteEscapes") @Test public void removesQuoteEscapes(String string, String expectedResult) throws Exception { assertEquals(expectedResult, HeaderHelper.removeQuoteEscapes(string)); }