@Test public void testDeriveChildTraverser_ZeroRemaining() { DependencyTraverser other1 = new DummyDependencyTraverser(true, null); DependencyTraverser other2 = new DummyDependencyTraverser(false, null); DependencyTraverser traverser = new AndDependencyTraverser(other1, other2); assertNull(traverser.deriveChildTraverser(null)); }
@Test public void testDeriveChildTraverser_Unchanged() { DependencyTraverser other1 = new DummyDependencyTraverser(true); DependencyTraverser other2 = new DummyDependencyTraverser(false); DependencyTraverser traverser = new AndDependencyTraverser(other1, other2); assertSame(traverser, traverser.deriveChildTraverser(null)); }