### Question:
ErrorUtils { public static String getErrorMessage(HttpServletRequest request) { final Throwable exc = (Throwable) request.getAttribute(ATTR_ERROR_EXCEPTION); return exc != null ? exc.getMessage() : UNEXPECTED_ERROR_OCCURRED; } private  ErrorUtils(); static int getErrorStatus(HttpServletRequest request); static String getErrorMessage(HttpServletRequest request); static String getGatewayUri(HttpServletRequest request); static final String ATTR_ERROR_EXCEPTION; }### Answer:
@Test void testGetErrorMessage() { MockHttpServletRequest request = new MockHttpServletRequest(); assertEquals(ErrorUtils.UNEXPECTED_ERROR_OCCURRED, ErrorUtils.getErrorMessage(request)); request.setAttribute(ErrorUtils.ATTR_ERROR_EXCEPTION, new Exception("Hello")); assertEquals("Hello", ErrorUtils.getErrorMessage(request)); }