### Question:
ErrorController { @ExceptionHandler(Throwable.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public String exception(final Throwable throwable, final Model model) { logger.error("Exception during execution of SpringSecurity application", throwable); String errorMessage = (throwable != null ? throwable.getMessage() : "Unknown error"); model.addAttribute("errorMessage", errorMessage); return "error"; }  @ExceptionHandler(Throwable.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) String exception(final Throwable throwable, final Model model);  }### Answer:
@Test void test_exception_NullThrowable_returnsError() { Assertions.assertEquals("error", errorController.exception(null, model)); }
@Test void test_exception_NullThrowable_putsUnknownErrorInTheModel() { errorController.exception(null, model); Assertions.assertEquals("Unknown error", model.asMap().get("errorMessage")); }
@Test void test_exception_throwable_putsExceptionMessageInTheModel() { errorController.exception(new Exception("exception message"), model); Assertions.assertEquals("exception message", model.asMap().get("errorMessage")); }