final CompositeObjectSinkAdapter ad = new CompositeObjectSinkAdapter();
InternalReadAccessor extractor = store.getReader( Cheese.class,
"type",
this.getClass().getClassLoader() );
final MvelConstraint lit = new MvelConstraintTestUtil( "type == \"stilton\"",
new ObjectFieldImpl( "stilton" ),
new MockExtractor() );
final AlphaNode al = new AlphaNode( buildContext.getNextId(),
lit,
new MockObjectSource( buildContext.getNextId() ),
buildContext );
ad.addObjectSink( al );
assertNull( ad.otherSinks );
assertNotNull( ad.hashedFieldIndexes );
assertEquals( 1,
ad.hashableSinks.size() );
assertEquals( al,
ad.getSinks()[0] );
final MvelConstraint lit2 = new MvelConstraintTestUtil( "type == \"cheddar\"",
new ObjectFieldImpl( "cheddar" ),
new MockExtractor() );
final AlphaNode al2 = new AlphaNode( buildContext.getNextId(),
lit2,
new MockObjectSource( buildContext.getNextId() ),
buildContext );
ad.addObjectSink( al2 );
assertNull( ad.hashedSinkMap );
assertEquals( 2,
ad.hashableSinks.size() );
final MvelConstraint lit3 = new MvelConstraintTestUtil( "type == \"stinky\"",
new ObjectFieldImpl( "stinky" ),
new MockExtractor() );
final AlphaNode al3 = new AlphaNode( buildContext.getNextId(),
lit3,