@Test
public void shouldCreateWrappedExceptionResponse() throws Exception {

    // given
    Exception e = new Exception(new Exception(new Exception("Wrapped message")));
    // when
    CommonResponse httpResponse = HTTP_SERVER_HANDLER.newHttpResponseFromException(
            mock(CommonRequest.class), mock(Authentication.class), e);
    // then
    String content = (String) httpResponse.getContent();
    ObjectNode node = (ObjectNode) new ObjectMapper().readTree(content);
    assertThat(node.get("message").asText()).isEqualTo("java.lang.Exception: Wrapped message");
    assertThat(node.get("stackTrace")).isNotNull();
    assertThat(httpResponse.getStatus()).isEqualTo(HttpResponseStatus.INTERNAL_SERVER_ERROR);
}