@Test
public void shouldCreateSqlTimeoutResponse() throws Exception {

    // given
    Exception e = new SQLException("", "", H2_STATEMENT_WAS_CANCELED);
    // when
    CommonResponse httpResponse = HTTP_SERVER_HANDLER.newHttpResponseFromException(
            mock(CommonRequest.class), mock(Authentication.class), e);
    // then
    String content = (String) httpResponse.getContent();
    assertThat(content).isEqualTo("{\"message\":"
            + "\"Query timed out (timeout is configurable under Configuration > Advanced)\"}");
    assertThat(httpResponse.getStatus()).isEqualTo(HttpResponseStatus.REQUEST_TIMEOUT);
}