@Test
public void testAndHavingToAndWhere() throws SQLException {
String query = "select count(1) from atable where b_string > 'bar' group by a_string having count(1) >= 1 and a_string = 'foo'";
List<Object> binds = Collections.emptyList();
Expressions expressions = compileStatement(query,binds);
Expression h = constantComparison(CompareOp.GREATER_OR_EQUAL, new CountAggregateFunction(),1L);
Expression w = and(constantComparison(CompareOp.GREATER, BaseConnectionlessQueryTest.B_STRING,"bar"),constantComparison(CompareOp.EQUAL, BaseConnectionlessQueryTest.A_STRING,"foo"));
assertEquals(w, expressions.whereClause);
assertEquals(h, expressions.havingClause);
}