// Property1 < Property2 (20 < 5) = true
try {
Vector v = new Vector();
v.add(propertySensor2);
v.add(propertySensor1);
Expression expression1 = new Less(v,true);
// Property1 < Property3 (20 < -20) = false
v.clear();
v.add(propertySensor1);
v.add(propertySensor3);
Expression expression2 = new Less(v,true);
v.clear();
v.add(propertySensor1);
v.add(new DoubleConstant(5));
Expression expression3 = new Less(v,true);
v.clear();
v.add(new DoubleConstant(-20));
v.add(new DoubleConstant(20));
Expression expression4 = new Less(v,true);
assertTrue(((Boolean) expression1.evaluate()).booleanValue());
assertFalse(
((Boolean) expression2.evaluate()).booleanValue());
assertFalse(
((Boolean) expression3.evaluate()).booleanValue());
assertTrue(((Boolean) expression4.evaluate()).booleanValue());
} catch (SPLException e) {
logger.severe("Received evaluation exception " + e.getMessage());
fail("Received evaluation exception " + e.getMessage());
} catch (Exception e) {
logger.severe("Received evaluation exception " + e.getMessage());