@Test
public void shouldCaptureIntermediateExceptions() {

    ServerConfig serverConfig = null; // WIll throw NPE
    HttpErrorHandlerResolver httpErrorHandlerResolver = new HttpErrorHandlerResolverImpl(serverConfig);
    HttpErrorHandler handler = httpErrorHandlerResolver.getHandler(new NotFoundException());
    assertThat(handler, is(instanceOf(HttpError500Handler.class)));
}