LeftInputAdapterNode liaNode = (LeftInputAdapterNode) node.getSinkPropagator().getSinks()[0];
JoinNode j2 = ( JoinNode ) liaNode.getSinkPropagator().getSinks()[0]; // $p2
JoinNode j3 = ( JoinNode ) j2.getSinkPropagator().getSinks()[0]; // $p3
SingleBetaConstraints c = ( SingleBetaConstraints ) j2.getRawConstraints();
assertEquals( "$name", ((VariableConstraint)c.getConstraint()).getRequiredDeclarations()[0].getIdentifier() );
assertTrue( c.isIndexed() );
BetaMemory bm = ( BetaMemory ) wm.getNodeMemory( j2 );
assertTrue( bm.getLeftTupleMemory() instanceof LeftTupleIndexHashTable );
assertTrue( bm.getRightTupleMemory() instanceof RightTupleIndexHashTable );
c = ( SingleBetaConstraints ) j3.getRawConstraints();
assertEquals( "name", ((VariableConstraint)c.getConstraint()).getRequiredDeclarations()[0].getIdentifier() );
assertTrue( c.isIndexed() );
bm = ( BetaMemory ) wm.getNodeMemory( j3 );
assertTrue( bm.getLeftTupleMemory() instanceof LeftTupleIndexHashTable );
assertTrue( bm.getRightTupleMemory() instanceof RightTupleIndexHashTable );
}