public void testExceptions() throws Exception
{
QueryExp operation = Query.eq(null, null);
assertTrue(operation.apply(null));
ValueExp value1 = Query.value(new Integer(3));
operation = Query.eq(value1, null);
assertTrue(!operation.apply(null));
operation = Query.eq(null, value1);
assertTrue(!operation.apply(null));
ValueExp value2 = Query.value(new Long(3));
ValueExp result = Query.plus(value1, value2);
operation = Query.eq(Query.value(6), result);
assertTrue(operation.apply(null));
// Comparing apple and oranges
ValueExp bvalue1 = Query.value(true);
operation = Query.eq(bvalue1, value2);
assertTrue(!operation.apply(null));
// Adding 2 booleans
ValueExp bvalue2 = Query.value(true);
result = Query.plus(bvalue1, bvalue2);
operation = Query.eq(Query.value(false), result);
try
{
operation.apply(null);