@Test
public void shouldReturnFailureForInvalidQuery() {

  assertThat(databaseQueryFunction(databaseSupplier, CURSOR_STRING_FUNCTION)
          .apply(sqlRequest()
              .sql(INVALID_QUERY)
              .compile()).getFailure(),
      instanceOf(SQLException.class));
}