testRootNode.save();
removeEventListener(listener);
EventIterator events = listener.getEventIterator(DEFAULT_WAIT_TIMEOUT);
assertNotNull("No events delivered within " + DEFAULT_WAIT_TIMEOUT + "ms.", events);
assertEquals("Initial call to getPosition() must return 0.", 0, events.getPosition());
events.nextEvent();
assertEquals("Wrong value for getPosition()", 1, events.getPosition());
events.nextEvent();
assertEquals("Wrong value for getPosition()", 2, events.getPosition());
events.nextEvent();
assertEquals("Wrong value for getPosition()", 3, events.getPosition());