### Question:
PrettyLogExceptionResolver extends SimpleMappingExceptionResolver { @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { if (shouldApplyTo(request, handler)) { logException(ex, request); logger.debug(request,ex); prepareResponse(ex, response); return doResolveException(request, response, handler, ex); } else { return null; } }  @Override ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response,
                                         Object handler, Exception ex);  }### Answer:
@Test public void testResolveExceptionFirstlyLogExceptionThenDebug() throws Exception { Log mockLog = replaceLoggerWithMock(prettyLogExceptionResolver); Exception exception = new Exception(); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); MockHttpServletResponse response = new MockHttpServletResponse(); Object handler = new Object(); request.setContent("".getBytes()); prettyLogExceptionResolver.resolveException(request, response, handler, exception); InOrder inOrder = inOrder(mockLog); inOrder.verify(mockLog, times(1)).info(anyString()); inOrder.verify(mockLog, times(1)).debug(request,exception); }