ExceptionLogger implements InitializingBean { public void setLogMessageFormat(String logMessageFormat) { this.logMessageFormat = logMessageFormat; } ExceptionLogger();  ExceptionLogger(String name); void setExceptionCodeResolver(
            ExceptionCodeResolver exceptionCodeResolver); void setExceptionLevelResolver(
            ExceptionLevelResolver exceptionLevelResolver); void setLogMessageFormat(String logMessageFormat); void setTrimLogMessage(boolean trimLogMessage); void setDefaultCode(String defaultCode); void setDefaultMessage(String defaultMessage); @Override void afterPropertiesSet(); void log(Exception ex); void info(Exception ex); void warn(Exception ex); void error(Exception ex);  }
@Test public void testSetLogMessageFormat() { testTarget.setLogMessageFormat("logId:{0}\tlogMessage:{1}"); String code = "exceptionCode"; String message = "exceptionMessage"; String actualLogMessage = testTarget.formatLogMessage(code, message); String expectedLogMessage = "logId:exceptionCode\tlogMessage:exceptionMessage"; assertThat(actualLogMessage, is(expectedLogMessage)); }