}
;
LogicalNode node = new LogicalNode(new Context(), "test");
IsOpenSource prev = new IsOpenSource();
node.openLoadNode(prev, new NullSink());
node.getSource().next(); // force lazy source to open
for (int i = 0; i < 10; i++) {
assertTrue(prev.isOpen);
IsOpenSource cur = new IsOpenSource();
node.openLoadNode(cur, new NullSink());
node.getSource().next(); // force lazy source to open.
assertFalse(prev.isOpen);
assertTrue(cur.isOpen);
prev = cur;
}