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));
List testFiles = new ArrayList<>();
testFiles.add(mock(FileDescriptor.class));
when(scanner.scan(Mockito.any(ClassesDirectory.class), Mockito.any(String.class), Mockito.eq(CLASSPATH))).thenReturn(mainFiles, testFiles);
scannerPlugin.scan(project, null, null, scanner);
verify(scanner).scan(Mockito.any(ClassesDirectory.class), Mockito.eq("target/classes"), Mockito.eq(CLASSPATH));
verify(scanner).scan(Mockito.any(ClassesDirectory.class), Mockito.eq("target/test-classes"), Mockito.eq(CLASSPATH));