### Question:
CycleBreakerGraphTransformer implements DependencyGraphTransformer { @VisibleForTesting boolean shouldVisitChildren(DependencyNode node) { return visitedNodes.add(node); }  @Override DependencyNode transformGraph(
      DependencyNode dependencyNode, DependencyGraphTransformationContext context);  }### Answer:
@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)); }