@Test public void testShouldVisitChildren() { CycleBreakerGraphTransformer transformer = new CycleBreakerGraphTransformer(); Artifact artifact = new DefaultArtifact("g:a:1"); DependencyNode node1 = new DefaultDependencyNode(artifact); DependencyNode node2 = new DefaultDependencyNode(artifact); assertTrue(transformer.shouldVisitChildren(node1)); assertFalse(transformer.shouldVisitChildren(node1)); assertTrue(transformer.shouldVisitChildren(node2)); }
@VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); }
CycleBreakerGraphTransformer implements DependencyGraphTransformer { @VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); } }
CycleBreakerGraphTransformer implements DependencyGraphTransformer { @VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); }  }
CycleBreakerGraphTransformer implements DependencyGraphTransformer { @VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); }  @Override DependencyNode transformGraph(
      DependencyNode dependencyNode, DependencyGraphTransformationContext context); }
CycleBreakerGraphTransformer implements DependencyGraphTransformer { @VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); }  @Override DependencyNode transformGraph(
      DependencyNode dependencyNode, DependencyGraphTransformationContext context);  }