AllTimeAxis extends AbstractTemporalAxis<R, W> { @Override public ResourceManager<R, W> getResourceManager() { return resourceManager; } AllTimeAxis(final ResourceManager<R, W> resourceManager, final R rtx); @Override ResourceManager<R, W> getResourceManager();  }
@Test public void testAxis() { try (final XmlNodeReadOnlyTrx firstReader = holder.getResourceManager().beginNodeReadOnlyTrx(1); final XmlNodeReadOnlyTrx secondReader = holder.getResourceManager().beginNodeReadOnlyTrx(2); final XmlNodeReadOnlyTrx thirdReader = holder.getXmlNodeReadTrx()) { new IteratorTester<>(ITERATIONS, IteratorFeature.UNMODIFIABLE, ImmutableList.of(firstReader, secondReader, thirdReader), null) { @Override protected Iterator<XmlNodeReadOnlyTrx> newTargetIterator() { return new AllTimeAxis<>(holder.getResourceManager(), holder.getXmlNodeReadTrx()); } }.test(); } }
@Test public void testAxisWithDeletedNode() { try (final XmlNodeTrx wtx = holder.getResourceManager().beginNodeTrx()) { wtx.moveTo(4); wtx.insertCommentAsRightSibling("foooooo"); wtx.commit(); wtx.moveTo(4); wtx.remove(); wtx.commit(); } try (final XmlNodeReadOnlyTrx firstReader = holder.getResourceManager().beginNodeReadOnlyTrx(1); final XmlNodeReadOnlyTrx secondReader = holder.getResourceManager().beginNodeReadOnlyTrx(2); final XmlNodeReadOnlyTrx thirdReader = holder.getResourceManager().beginNodeReadOnlyTrx(3); final XmlNodeReadOnlyTrx fourthReader = holder.getResourceManager().beginNodeReadOnlyTrx(4)) { firstReader.moveTo(4); secondReader.moveTo(4); thirdReader.moveTo(4); fourthReader.moveTo(4); new IteratorTester<>(ITERATIONS, IteratorFeature.UNMODIFIABLE, ImmutableList.of(firstReader, secondReader, thirdReader, fourthReader), null) { @Override protected Iterator<XmlNodeReadOnlyTrx> newTargetIterator() { return new AllTimeAxis<>(fourthReader.getResourceManager(), fourthReader); } }.test(); } }