MulePluginVisitor extends AbstractArtifactVisitor { @Override public void collectDependencies(ProjectDependencyNode node) { collectedDependencies.addAll(node.getDependencies(dependenciesFilter)); } MulePluginVisitor();  MulePluginVisitor(String scope); @Override void collectDependencies(ProjectDependencyNode node);  }
@Test public void collectDependenciesTest() throws ValidationException { nodeSpy = createProjectDependencyNodeSpy(); Set<ArtifactCoordinates> dependencies = buildDependencies(NUMBER_DEPENDENCIES); doReturn(dependencies).when(nodeSpy).getDependencies(any()); visitor.collectDependencies(nodeSpy); assertThat("Collected dependencies is not the expected", visitor.getCollectedDependencies(), equalTo(dependencies)); }