### Question:
CParserUtils { public static String handleParseProblem(Throwable t, String functionString) { if (t instanceof TokenMgrError) { return generateTokenErrorMessage((TokenMgrError) t, functionString); } else if (t instanceof ParseException) { return generateParseExceptionMessage((ParseException) t, functionString); } return null; } private  CParserUtils(); static FunctionDefinitionDataType parseSignature(ServiceProvider serviceProvider,
			Program program, String signatureText); static FunctionDefinitionDataType parseSignature(DataTypeManagerService service,
			Program program, String signatureText); static FunctionDefinitionDataType parseSignature(DataTypeManagerService service,
			Program program, String signatureText, boolean handleExceptions); static String handleParseProblem(Throwable t, String functionString);  }### Answer:
@Test public void testUserMessage_OnTokenMgrError() { String function = "void bob@12(int a)"; Throwable t = getParseError(function); String message = CParserUtils.handleParseProblem(t, function); String characterInfo = "near character 8"; String invalidInfo = "<font color=\"red\"><b>@"; assertTrue(message.contains(characterInfo)); assertTrue(message.contains(invalidInfo)); }
@Test public void testUserMessage_OnParseException() { String function = "void bob(int a)()"; Throwable t = getParseError(function); String message = CParserUtils.handleParseProblem(t, function); String characterInfo = "near character 17"; assertTrue(message.contains(characterInfo)); }