### Question:
ResourceAccessExceptionHandler extends AbstractExceptionHandler { @Override public void handleException(HttpServletRequest request, HttpServletResponse response, RuntimeException ex) throws ServletException { if (ex instanceof GatewayNotAvailableException) { handleGatewayNotAvailable(request, response, ex); } else if (ex instanceof ServiceNotAccessibleException) { handleServiceNotAccessible(request, response, ex); } else { throw ex; } } @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")  ResourceAccessExceptionHandler(MessageService messageService, ObjectMapper mapper); @Override void handleException(HttpServletRequest request, HttpServletResponse response, RuntimeException ex);  }### Answer:
@Test(expected = HttpServerErrorException.class) public void shouldRethrowException() throws ServletException { resourceAccessExceptionHandler.handleException(httpServletRequest, httpServletResponse, new HttpServerErrorException(HttpStatus.INTERNAL_SERVER_ERROR)); }