build.setOutputDirectory("target/classes");
build.setTestOutputDirectory("target/test-classes");
when(project.getBuild()).thenReturn(build);
Map<String, Object> properties = new HashMap<>();
properties.put(MavenProject.class.getName(), project);
Store store = mock(Store.class);
MavenProjectDirectoryDescriptor projectDescriptor = mock(MavenProjectDirectoryDescriptor.class);
when(store.find(MavenProjectDirectoryDescriptor.class, "group:artifact:1.0.0")).thenReturn(null, projectDescriptor);
when(store.create(MavenProjectDirectoryDescriptor.class, "group:artifact:1.0.0")).thenReturn(projectDescriptor);
ArtifactDirectoryDescriptor mainArtifact = mock(ArtifactDirectoryDescriptor.class);
when(store.find(ArtifactDescriptor.class, "group:artifact:jar:main:1.0.0")).thenReturn(null, mainArtifact);
when(store.create(ArtifactDirectoryDescriptor.class, "group:artifact:jar:main:1.0.0")).thenReturn(mainArtifact);
ArtifactDirectoryDescriptor testArtifact = mock(ArtifactDirectoryDescriptor.class);
when(store.find(ArtifactDescriptor.class, "group:artifact:test-jar:main:1.0.0")).thenReturn(null, testArtifact);
when(store.create(ArtifactDirectoryDescriptor.class, "group:artifact:test-jar:main:1.0.0")).thenReturn(testArtifact);
DependsOnDescriptor dependsOnDescriptor = mock(DependsOnDescriptor.class);
when(store.create(testArtifact, DependsOnDescriptor.class, mainArtifact)).thenReturn(dependsOnDescriptor);
MavenProjectDescriptor parentProjectDescriptor = mock(MavenProjectDescriptor.class);
when(store.find(MavenProjectDescriptor.class, "group:parent-artifact:1.0.0")).thenReturn(null, parentProjectDescriptor);
when(store.create(MavenProjectDescriptor.class, "group:parent-artifact:1.0.0")).thenReturn(parentProjectDescriptor);
scannerPlugin.initialize(store, properties);
Scanner scanner = mock(Scanner.class);
List mainFiles = new ArrayList<>();
mainFiles.add(mock(FileDescriptor.class));