@Test
public void testAttach() throws Exception {

    QueryElement queryElement = new QueryElement(null, null, new QueryArgument[0], null, null, false, false);
    final MockTupleSource source = new MockTupleSource( 12 );
    final QueryElementNode node = new QueryElementNode( 18,
                                                        source,
                                                        queryElement,
                                                        true,
                                                        false,
                                                        buildContext );
    assertEquals( 18,
                  node.getId() );
    assertEquals( 0,
                  source.getAttached() );
    node.attach(buildContext);
    assertEquals( 1,
                  source.getAttached() );
}