### Question:
JavaCCParserBase { static String unescapeStr(String s, int line, int column) throws ParseException { return unescape(s, '\\', line, column); } JavaCCParserBase(); void setKnowledgeBase(KnowledgeBase knowledgeBase); KnowledgeBase getKnowledgeBase(); void setParserConfiguration(ParserConfiguration parserConfiguration); ParserConfiguration getParserConfiguration(); void setPrefixDeclarationRegistry(PrefixDeclarationRegistry prefixDeclarationRegistry); PrefixDeclarationRegistry getPrefixDeclarationRegistry();  }### Answer:
@Test public void unescapeStr_escapeChars_succeeds() throws ParseException { String input = "\\\\test\r\ntest: \\n\\t\\r\\b\\f\\'\\\"\\\\"; String expected = "\\test\r\ntest: \n\t\r\b\f\'\"\\"; String result = JavaCCParserBase.unescapeStr(input, 0, 0); assertEquals(result, expected); }
@Test public void unescapeStr_illegalEscapeAtEndOfString_throws() throws ParseException { exceptionRule.expect(ParseException.class); exceptionRule.expectMessage("Illegal escape at end of string"); JavaCCParserBase.unescapeStr("\\", 0, 0); }
@Test public void unescapeStr_unknownEscapeSequence_throws() throws ParseException { exceptionRule.expect(ParseException.class); exceptionRule.expectMessage("Unknown escape"); JavaCCParserBase.unescapeStr("\\y", 0, 0); }