public void testUpdate2() {
String rule1 = "$a.setC( $bc );\n $b.c = \"Hello\";\n update( $a );\n update( $b );";
KnowledgeBase kbase = getKnowledgeBase(rule1);
RuleImpl rule = getRule(kbase, "R0");
ConsequenceMetaData consequenceMetaData = rule.getConsequenceMetaData();
assertEquals(2, consequenceMetaData.getStatements().size());
ConsequenceMetaData.Statement statment1 = consequenceMetaData.getStatements().get(0);
assertEquals(ConsequenceMetaData.Statement.Type.MODIFY, statment1.getType());
assertEquals("org.drools.A", statment1.getFactClassName());
assertEquals(1, statment1.getFields().size());
ConsequenceMetaData.Field field1 = statment1.getFields().get(0);
assertEquals("c", field1.getName());
assertEquals("$bc", field1.getValue());
assertFalse(field1.isLiteral());
ConsequenceMetaData.Statement statment2 = consequenceMetaData.getStatements().get(1);
assertEquals(ConsequenceMetaData.Statement.Type.MODIFY, statment2.getType());
assertEquals(RuleMetadataTest.B.class.getName(), statment2.getFactClassName());
assertEquals(1, statment2.getFields().size());
ConsequenceMetaData.Field field2 = statment2.getFields().get(0);
assertEquals("c", field2.getName());