### Question:
KLog implements KLogger { @Override public synchronized void error(String message, Object... args) { kLogger.error(message, args); } private  KLog(); static KLog getLogger(); @Override void dispose(); @Override String getLogPath(); @Override synchronized void setLogPath(String logPath); @Override synchronized void setLevel(Level level); @Override synchronized void info(String message, Object... args); @Override synchronized void info(String message, Throwable throwable, Object... args); @Override boolean isInfoEnabled(); @Override synchronized void warn(String message, Object... args); @Override synchronized void warn(String message, Throwable throwable, Object... args); @Override boolean isWarnEnabled(); @Override synchronized void error(String message, Object... args); @Override synchronized void error(String message, Throwable throwable, Object... args); @Override boolean isErrorEnabled(); @Override synchronized void debug(String message, Object... args); @Override synchronized void debug(String message, Throwable throwable, Object... args); @Override boolean isDebugEnabled(); @Override synchronized void trace(String message, Object... args); @Override synchronized void trace(String message, Throwable throwable, Object... args); @Override boolean isTraceEnabled();  }### Answer:
@Test public void testLogError() throws Exception { assertNotNull(logger); File newLogFile = configureLogPath(logger); String msg = "This is a exception test"; Exception testException = new Exception("This is a test exception"); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); testException.printStackTrace(pw); logger.error(msg, testException); String fileMsg = retrieveLogContents(newLogFile); System.out.println("The File Message: " + fileMsg); assertTrue(fileMsg.contains("ERROR " + KLogger.class.getName() + " - " + msg)); assertTrue(fileMsg.contains(msg)); }