public void testDateEffective() {
WorkingMemory wm = new ReteooRuleBase("x", null).newStatefulSession();
final Rule rule = new Rule( "myrule" );
assertTrue( rule.isEffective(null, new RuleTerminalNode(), wm ) );
final Calendar earlier = Calendar.getInstance();
earlier.setTimeInMillis( 10 );
rule.setDateEffective( earlier );
assertTrue( rule.isEffective(null, new RuleTerminalNode(), wm ) );
final Calendar later = Calendar.getInstance();
later.setTimeInMillis( later.getTimeInMillis() + 100000000 );
assertTrue( later.after( Calendar.getInstance() ) );
rule.setDateEffective( later );
assertFalse( rule.isEffective(null, new RuleTerminalNode(), wm ) );
}