wm.insert( new B() );
wm.insert( new C() );
wm.insert( new D() );
wm.insert( new G() );
LiaNodeMemory liaMem = ( LiaNodeMemory ) wm.getNodeMemory( liaNode );
BetaMemory bMem = ( BetaMemory ) wm.getNodeMemory( bNode );
BetaMemory exists1Mem = ( BetaMemory ) wm.getNodeMemory( exists1n );
BetaMemory cMem = ( BetaMemory ) wm.getNodeMemory( cNode );
BetaMemory dMem = ( BetaMemory ) wm.getNodeMemory( dNode );
BetaMemory exists2Mem = ( BetaMemory ) wm.getNodeMemory( exists2n );
BetaMemory eMem = ( BetaMemory ) wm.getNodeMemory( eNode );
BetaMemory fMem = ( BetaMemory ) wm.getNodeMemory( fNode );
BetaMemory gMem = ( BetaMemory ) wm.getNodeMemory( gNode );
RightInputAdapterNode.RiaNodeMemory riaMem1 = (RightInputAdapterNode.RiaNodeMemory) wm.getNodeMemory( riaNode1 );
RightInputAdapterNode.RiaNodeMemory riaMem2 = (RightInputAdapterNode.RiaNodeMemory) wm.getNodeMemory( riaNode2 );
PathMemory rs = (PathMemory) wm.getNodeMemory( rtn );
assertFalse( rs.isRuleLinked() ); //E and F are not inserted yet, so rule is unlinked
//---
// assert a and b in same segment
assertSame( liaMem.getSegmentMemory(), bMem.getSegmentMemory() );
// exists1 and b not in same segment
assertNotSame( bMem.getSegmentMemory(), exists1Mem.getSegmentMemory() );
// exists1 and b are in same segment
assertSame( exists1Mem.getSegmentMemory(), gMem.getSegmentMemory() );
// check segment masks
assertEquals( 2, rs.getSegmentMemories().length );
assertEquals( 3, rs.getAllLinkedMaskTest() );
assertEquals( 1, rs.getLinkedSegmentMask() );
assertEquals( 3, liaMem.getSegmentMemory().getAllLinkedMaskTest() );
assertEquals( 1, liaMem.getNodePosMaskBit() );
assertEquals( 2, bMem.getNodePosMaskBit() );
assertEquals( 3, exists1Mem.getSegmentMemory().getAllLinkedMaskTest() );
assertEquals( 1, exists1Mem.getNodePosMaskBit() );
assertEquals( 2, gMem.getNodePosMaskBit() );