### Question:
PoulpeNotificationHandler { @ExceptionHandler(Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public ModelAndView handleAllExceptions(Exception exception) { MappingJacksonJsonView jsonView = new MappingJacksonJsonView(); ModelAndView mav = new ModelAndView(jsonView); mav.addObject(ERROR_MESSAGE_PARAMETER, exception.getMessage()); return mav; } @Autowired  PoulpeNotificationHandler(BranchService branchService, SectionService sectionService,
                                     UserService userService); @RequestMapping(value = "/branches/{branchId}", method = RequestMethod.DELETE) @ResponseBody void deleteBranch(@PathVariable("branchId") long branchId,
                             @RequestParam(value = "password") String adminPassword); @RequestMapping(value = "/sections/{sectionId}", method = RequestMethod.DELETE) @ResponseBody void deleteSection(@PathVariable("sectionId") long sectionId,
                              @RequestParam(value = "password") String adminPassword); @RequestMapping(value = "/component", method = RequestMethod.DELETE) @ResponseBody void deleteComponent(@RequestParam(value = "password") String adminPassword); @ExceptionHandler(Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) ModelAndView handleAllExceptions(Exception exception);  }### Answer:
@Test public void testHandleAllExceptions() { Exception exception = new Exception("Some message"); ModelAndView mav = controller.handleAllExceptions(exception); assertTrue(mav.getView() instanceof MappingJacksonJsonView); assertEquals(mav.getModel().get("errorMessage"), exception.getMessage()); }