QuadrigaExceptionHandler { @ExceptionHandler(QuadrigaException.class) public ModelAndView handleNotImplementedEx(Exception ex) { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("auth/notImplemented"); modelAndView.addObject("ex_name", ex.getClass().getName()); modelAndView.addObject("ex_message", ex.getMessage()); logger.error(ex.getMessage(), ex); return modelAndView; }  @ExceptionHandler(QuadrigaException.class) ModelAndView handleNotImplementedEx(Exception ex); @ExceptionHandler(QuadrigaStorageException.class) ModelAndView handleSQLException(QuadrigaStorageException ex); @ExceptionHandler(value = { QuadrigaAccessException.class }) ModelAndView handleUserAccessException(QuadrigaAccessException ex); @ExceptionHandler(value = { Quadriga404Exception.class }) ModelAndView handle404Exception(Quadriga404Exception ex); @ExceptionHandler(value = { IllegalObjectException.class }) ModelAndView handleInvalidCastException(IllegalObjectException ioe);  }
@Test public void handleNotImplementedExTest() { ModelAndView view = exceptionHandler.handleNotImplementedEx(ex); assertEquals("auth/notImplemented", view.getViewName()); assertEquals(ex.getClass().getName(), view.getModelMap().get("ex_name")); assertEquals(ex.getMessage(), view.getModelMap().get("ex_message")); }