assertEquals( 0,
fp0.getNumberOfConstraints() );
IPattern p1 = m.lhs[ 1 ];
assertTrue( p1 instanceof FromCollectCompositeFactPattern );
FromCollectCompositeFactPattern fp1 = (FromCollectCompositeFactPattern) p1;
assertEquals( "java.util.List",
fp1.getFactPattern().getFactType() );
assertEquals( "$transactions",
fp1.getFactPattern().getBoundName() );
assertEquals( 1,
fp1.getFactPattern().getNumberOfConstraints() );
assertTrue( fp1.getFactPattern().getConstraint( 0 ) instanceof SingleFieldConstraint );
SingleFieldConstraint fp1sfc = (SingleFieldConstraint) fp1.getFactPattern().getConstraint( 0 );
assertEquals( "size > 0",
fp1sfc.getValue() );
assertEquals( BaseSingleFieldConstraint.TYPE_PREDICATE,
fp1sfc.getConstraintValueType() );
assertTrue( fp1.getRightPattern() instanceof FromCompositeFactPattern );
FromCompositeFactPattern fp2 = (FromCompositeFactPattern) fp1.getRightPattern();
assertNotNull( fp2.getFactPattern() );
FactPattern fp3 = fp2.getFactPattern();
assertEquals( "Transaction",
fp3.getFactType() );