public void testSimpleSelectFromWhere() throws Exception {
Query q = MetaModelHelper.parseQuery(dc, "SELECT foo FROM sch.tbl WHERE bar = 'baz' AND baz > 5");
assertEquals("SELECT tbl.foo FROM sch.tbl WHERE tbl.bar = 'baz' AND tbl.baz > 5", q.toSql());
FilterClause whereClause = q.getWhereClause();
assertEquals(2, whereClause.getItemCount());
assertNull("WHERE item was an expression based item, which indicates it was not parsed", whereClause.getItem(0)
.getExpression());
assertEquals(2, whereClause.getItemCount());
assertNull("WHERE item was an expression based item, which indicates it was not parsed", whereClause.getItem(1)
.getExpression());
assertEquals("baz", whereClause.getItem(0).getOperand());
assertEquals(Integer.class, whereClause.getItem(1).getOperand().getClass());
}