@Test
public void testafterPropertiesSet() throws Throwable {

    testTarget = new HandlerExceptionResolverLoggingInterceptor();
    testTarget.afterPropertiesSet();
    this.mockExceptionLogger = spy(testTarget.getExceptionLogger());
    testTarget.setExceptionLogger(mockExceptionLogger);
    // do setup for test case.
    NullPointerException occurException = new NullPointerException("null pointer exception.");
    HttpServletResponse mockResponse = mock(HttpServletResponse.class);
    ExceptionHandlerExceptionResolver resolver = new ExceptionHandlerExceptionResolver();
    when(mockMethodInvocation.proceed()).thenReturn("viewname");
    when(mockMethodInvocation.getThis()).thenReturn(resolver);
    when(mockResponse.getStatus()).thenReturn(100);
    when(mockMethodInvocation.getArguments()).thenReturn(new Object[] {
            null, mockResponse, null, occurException });
    // do test.
    testTarget.invoke(mockMethodInvocation);
    // do assert.
    verify(mockExceptionLogger, times(1)).info((Exception) any());
}