Buggy code:
public class QuestionnaireTest extends DroolsAbstractPMMLTest { private static final boolean VERBOSE = false ; private static final String source = "org//drools//pmml_4_0//test_miningSchema.xml" ; private static final String source2 = "org//drools//pmml_4_0//test_ann_iris_prediction.xml" ; private static final String sourceMix = "org//drools//pmml_4_0//test_ann_mixed_inputs.xml" ; private static final String packageName = "org.drools.pmml_4_0.test" ; @ Test public void testOverride ( ) throws Exception { setKSession ( getModelSession ( QuestionnaireTest . source , QuestionnaireTest . VERBOSE ) ) ; setKbase ( getKSession ( ) . getKnowledgeBase ( ) ) ; getKSession ( ) . fireAllRules ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Feat1" ) . insert ( 2.2 ) ; getKSession ( ) . fireAllRules ( ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Feat2" ) . insert ( 5 ) ; getKSession ( ) . fireAllRules ( ) ; System . err . println ( reportWMObjects ( getKSession ( ) ) ) ; FactType feat1 = getKbase ( ) . getFactType ( "org.drools.pmml_4_0.test" , "Feat1" ) ; FactType feat2 = getKbase ( ) . getFactType ( "org.drools.pmml_4_0.test" , "Feat2" ) ; Collection c = getKSession ( ) . getObjects ( new ClassObjectFilter ( DomainModelAssociation . class ) ) ; Iterator iter = c . iterator ( ) ; assertEquals ( 2 , c . size ( ) ) ; DomainModelAssociation dma1 = ( ( DomainModelAssociation ) ( iter . next ( ) ) ) ; if ( dma1 . getObject ( ) . getClass ( ) . equals ( feat2 . getFactClass ( ) ) ) { assertEquals ( 5 , feat2 . get ( dma1 . getObject ( ) , "value" ) ) ; } else if ( dma1 . getObject ( ) . getClass ( ) . equals ( feat1 . getFactClass ( ) ) ) { assertEquals ( 2.2 , feat1 . get ( dma1 . getObject ( ) , "value" ) ) ; } DomainModelAssociation dma2 = ( ( DomainModelAssociation ) ( iter . next ( ) ) ) ; if ( dma2 . getObject ( ) . getClass ( ) . equals ( feat2 . getFactClass ( ) ) ) { assertEquals ( 5 , feat2 . get ( dma2 . getObject ( ) , "value" ) ) ; } else if ( dma2 . getObject ( ) . getClass ( ) . equals ( feat1 . getFactClass ( ) ) ) { assertEquals ( 2.2 , feat1 . get ( dma2 . getObject ( ) , "value" ) ) ; } getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Feat1" ) . insert ( 2.5 ) ; getKSession ( ) . getWorkingMemoryEntryPoint ( "in_Feat2" ) . insert ( 6 ) ; getKSession ( ) . fireAllRules ( ) ; System . err . println ( reportWMObjects ( getKSession ( ) ) ) ; c = getKSession ( ) . getObjects ( new ClassObjectFilter ( DomainModelAssociation . class ) ) ; iter = c . iterator ( ) ; <START_BUG> assertEquals ( 3 , c . size ( ) ) ; <END_BUG> while ( iter . hasNext ( ) ) { DomainModelAssociation dma = ( ( DomainModelAssociation ) ( iter . next ( ) ) ) ; if ( dma . getObject ( ) . getClass ( ) . equals ( feat2 . getFactClass ( ) ) ) { assertEquals ( 6 , feat2 . get ( dma . getObject ( ) , "value" ) ) ; } else if ( dma . getObject ( ) . getClass ( ) . equals ( feat1 . getFactClass ( ) ) ) { Object val = feat1 . get ( dma . getObject ( ) , "value" ) ; System . out . println ( ( "Check<seq2seq4repair_space>" + val ) ) ; assertTrue ( ( ( val . equals ( new Double ( 2.2 ) ) ) || ( val . equals ( new Double ( 2.5 ) ) ) ) ) ; } } } @ Test public void testMixModel ( ) throws Exception { } @ Test public void testGenerateInputsByAnswer ( ) throws Exception { } @ Test public void testAnswerUpdate ( ) throws Exception { } @ Test public void testInvalidValues ( ) throws Exception { } private String getQId ( String model , String field ) { } @ Test public void testMultipleModels ( ) throws Exception { } }

Fix:
assertEquals ( 2 , c . size ( ) ) ;