@Test
public void shouldReturnResponseWithValidErrorJSONWithoutMessage() throws IOException {

    // given
    ErrorHandler errorHandler = new ErrorHandler();
    HttpServletRequest request = mock(HttpServletRequest.class);
    HttpServletResponse response = mock(HttpServletResponse.class);
    when(request.getAttribute("javax.servlet.error.message")).thenReturn("");
    when(request.getAttribute("javax.servlet.error.status_code")).thenReturn(200);
    // when
    String message = errorHandler.createResponseMessage(request, response);
    // then
    assertNotNull(message);
    assertEquals("{\"errors\":[ {\"message\":\"Internal PaasManager Server error\",\"code\":500}]}", message);
    verify(response).setStatus(500);
}