@Test
public void testMinifierCode() {

	GoogleJavaScriptMinifier googleJavaScriptMinifier =
		new GoogleJavaScriptMinifier();
	String code = "function(){ var invalidFunctionExpression; }";
	try (CaptureHandler captureHandler =
			JDKLoggerTestUtil.configureJDKLogger(
				GoogleJavaScriptMinifier.class.getName(), Level.SEVERE)) {
		String minifiedJS = googleJavaScriptMinifier.compress("test", code);
		Assert.assertEquals(44, minifiedJS.length());
		List<LogRecord> logRecords = captureHandler.getLogRecords();
		Assert.assertEquals(logRecords.toString(), 2, logRecords.size());
		LogRecord logRecord = logRecords.get(0);
		Assert.assertEquals(
			"(test:1): Parse error. 'identifier' expected " +
				"[JSC_PARSE_ERROR]",
			logRecord.getMessage());
		logRecord = logRecords.get(1);
		Assert.assertEquals(
			"(test): 1 error(s), 0 warning(s)", logRecord.getMessage());
		captureHandler.resetLogLevel(Level.SEVERE);
	}
}