@Test
public void testAfterPropertiesSet() throws Exception {

    // do setup.
    applicationLogger.setLevel(Level.INFO);
    monitoringLogger.setLevel(Level.INFO);
    Exception ex = new SystemException("i.code01", "system error.");
    ExceptionCodeResolver mockExceptionCodeResolver = mock(
            ExceptionCodeResolver.class);
    when(mockExceptionCodeResolver.resolveExceptionCode(ex)).thenReturn(
            "i.code01");
    testTarget.setExceptionCodeResolver(mockExceptionCodeResolver);
    testTarget.setExceptionLevelResolver(null);
    testTarget.afterPropertiesSet();
    // do test.
    testTarget.log(ex);
    // do assert.
    String expectedLogMessage = "[i.code01] system error.";
    verifyLogging(expectedLogMessage, Level.INFO, ex,
            mockApplicationLoggerAppender);
    verifyLogging(expectedLogMessage, Level.INFO,
            mockMonitoringLoggerAppender);
}