### Question:
Parser { public static String unescapeEntities(String string, boolean inAttribute) { Tokeniser tokeniser = new Tokeniser(new CharacterReader(string), ParseErrorList.noTracking()); return tokeniser.unescapeEntities(inAttribute); } Parser(TreeBuilder treeBuilder); Document parseInput(String html, String baseUri); Document parseInput(Reader inputHtml, String baseUri); List<Node> parseFragmentInput(String fragment, Element context, String baseUri); TreeBuilder getTreeBuilder(); Parser setTreeBuilder(TreeBuilder treeBuilder); boolean isTrackErrors(); Parser setTrackErrors(int maxErrors); ParseErrorList getErrors(); Parser settings(ParseSettings settings); ParseSettings settings(); static Document parse(String html, String baseUri); static List<Node> parseFragment(String fragmentHtml, Element context, String baseUri); static List<Node> parseFragment(String fragmentHtml, Element context, String baseUri, ParseErrorList errorList); static List<Node> parseXmlFragment(String fragmentXml, String baseUri); static Document parseBodyFragment(String bodyHtml, String baseUri); static String unescapeEntities(String string, boolean inAttribute); static Document parseBodyFragmentRelaxed(String bodyHtml, String baseUri); static Parser htmlParser(); static Parser xmlParser();  }### Answer:
@Test public void unescapeEntities() { String s = Parser.unescapeEntities("One &amp; Two", false); assertEquals("One & Two", s); }
@Test public void unescapeEntitiesHandlesLargeInput() { StringBuilder longBody = new StringBuilder(500000); do { longBody.append("SomeNonEncodedInput"); } while (longBody.length() < 64 * 1024); String body = longBody.toString(); assertEquals(body, Parser.unescapeEntities(body, false)); }