public <U> void checkNullValues( byte operandType, U value ) throws Exception {
ConstantExpression lt = GenPhyOp.exprConst();
ConstantExpression rt = GenPhyOp.exprConst();
EqualToExpr g = GenPhyOp.compEqualToExpr();
// test with null in lhs
g.setOperandType(operandType);
lt.setValue(null);
rt.setValue( value );
g.setLhs(lt);
g.setRhs(rt);
Result r = g.getNext(new Boolean(true));
assertEquals(POStatus.STATUS_NULL, r.returnStatus);
assertEquals(null, (Boolean)r.result);
// test with null in rhs
g.setOperandType(operandType);
lt.setValue( value );
rt.setValue(null);
g.setLhs(lt);
g.setRhs(rt);
r = g.getNext(new Boolean(true));
assertEquals(POStatus.STATUS_NULL, r.returnStatus);
assertEquals(null, (Boolean)r.result);
// test with null in lhs and rhs
g.setOperandType(operandType);
lt.setValue(null);
rt.setValue(null);
g.setLhs(lt);
g.setRhs(rt);
r = g.getNext(new Boolean(true));
assertEquals(POStatus.STATUS_NULL, r.returnStatus);
assertEquals(null, (Boolean)r.result);
}