@Test
public void testPredicateAsFirstPattern() throws Exception {
KnowledgeBase kbase = loadKnowledgeBase( "predicate_as_first_pattern.drl" );
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
final Cheese mussarela = new Cheese( "Mussarela",
35 );
ksession.insert( mussarela );
final Cheese provolone = new Cheese( "Provolone",
20 );
ksession.insert( provolone );
ksession.fireAllRules();
assertEquals( "The rule is being incorrectly fired",
35,
mussarela.getPrice() );
assertEquals( "Rule is incorrectly being fired",
20,
provolone.getPrice() );
}