@Test
@FixFor( "MODE-791" )
@SuppressWarnings( "deprecation" )
public void shouldReturnNodesWithPropertyConstrainedByTimestamp() throws Exception {

    String sql = "SELECT car:model, car:year, car:maker FROM car:Car " + "WHERE jcr:path LIKE '/Cars/%' "
                 + "AND (car:msrp LIKE '$3%' OR car:msrp LIKE '$2') " + "AND (car:year LIKE '2008' OR car:year LIKE '2009') "
                 + "AND car:valueRating > '1' " + "AND jcr:created > TIMESTAMP '1974-07-10T00:00:00.000-05:00' "
                 + "AND jcr:created < TIMESTAMP '3074-07-10T00:00:00.000-05:00'";
    Query query = session.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
    QueryResult result = query.execute();
    String[] columnNames = {"car:model", "car:year", "car:maker", "jcr:path", "jcr:score"};
    validateQuery().rowCount(5).hasColumns(columnNames).onEachRow(new Predicate() {
        @Override
        public void validate( int rowNumber,
                              Row row ) throws RepositoryException {
            assertTrue(row.getNode().hasProperty("car:model"));
        }
    }).validate(query, result);
}