@Test void testLogAndHandleExceptionHttpServletRequestModelAndView() { Exception e = mock(Exception.class); HttpStatus httpStatus = HttpStatus.BAD_REQUEST; MockHttpServletRequest request = new MockHttpServletRequest(); ExceptionResponseGenerator responseGenerator = mock(ExceptionResponseGenerator.class); when(exceptionResponseGeneratorRegistry.getExceptionResponseGenerator(MODEL_AND_VIEW)) .thenReturn(responseGenerator); exceptionHandlerFacadeImpl.logAndHandleException(e, httpStatus, request); verify(responseGenerator).createExceptionResponse(e, httpStatus, false); }
@Override public Object logAndHandleException( Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod) { ExceptionResponseType responseType = getExceptionResponseType(handlerMethod); return logAndHandleException(exception, httpStatus, responseType); }
ExceptionHandlerFacadeImpl implements ExceptionHandlerFacade { @Override public Object logAndHandleException( Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod) { ExceptionResponseType responseType = getExceptionResponseType(handlerMethod); return logAndHandleException(exception, httpStatus, responseType); } }
ExceptionHandlerFacadeImpl implements ExceptionHandlerFacade { @Override public Object logAndHandleException( Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod) { ExceptionResponseType responseType = getExceptionResponseType(handlerMethod); return logAndHandleException(exception, httpStatus, responseType); } ExceptionHandlerFacadeImpl(ExceptionResponseGeneratorRegistry responseGeneratorRegistry); }
ExceptionHandlerFacadeImpl implements ExceptionHandlerFacade { @Override public Object logAndHandleException( Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod) { ExceptionResponseType responseType = getExceptionResponseType(handlerMethod); return logAndHandleException(exception, httpStatus, responseType); } ExceptionHandlerFacadeImpl(ExceptionResponseGeneratorRegistry responseGeneratorRegistry); @Override Object logAndHandleException(
      Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod); @Override Object logAndHandleException(
      Exception exception, HttpStatus httpStatus, HttpServletRequest request); }
ExceptionHandlerFacadeImpl implements ExceptionHandlerFacade { @Override public Object logAndHandleException( Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod) { ExceptionResponseType responseType = getExceptionResponseType(handlerMethod); return logAndHandleException(exception, httpStatus, responseType); } ExceptionHandlerFacadeImpl(ExceptionResponseGeneratorRegistry responseGeneratorRegistry); @Override Object logAndHandleException(
      Exception exception, HttpStatus httpStatus, HandlerMethod handlerMethod); @Override Object logAndHandleException(
      Exception exception, HttpStatus httpStatus, HttpServletRequest request);  }