ModuleAnnotationVisitor extends VoidVisitorAdapter<Object> { public static ModuleAnnotationVisitor create(DependencyGraph.Builder builder) { Preconditions.notNull(builder); return new ModuleAnnotationVisitor(builder); } private  ModuleAnnotationVisitor(DependencyGraph.Builder builder); static ModuleAnnotationVisitor create(DependencyGraph.Builder builder); @Override void visit(ClassOrInterfaceDeclaration declaration, Object arg); @Override void visit(MethodDeclaration method, Object arg);  }
@Test public void whenIntoSetProivde_thenDependencyAsSet() { DependencyGraph.Builder graphBuilder = DependencyGraph.builder(); ModuleAnnotationVisitor annotationVisitor = ModuleAnnotationVisitor.create(graphBuilder); visitSrc(MODULE_INTO_SET_SRC, annotationVisitor); DependencyGraph graph = graphBuilder.build(); assertThat(graph.nodes()).hasSize(4); assertThat(graph.nodeOrThrow("Set<File>").dependencies()) .containsExactlyInAnyOrder(graph.nodeOrThrow("Object"), graph.nodeOrThrow("String")); assertThat(graph.nodeOrThrow("OkHttpClient").dependencies()) .containsExactly(graph.nodeOrThrow("Set<File>")); }