@Test
public void testListScanFiles() throws Exception {

    final File testOutDir = new File(testOutBaseDir, "testListScanFiles");
    FileUtils.deleteDirectory(testOutDir);
    testOutDir.mkdirs();
    ScanManyArtifactsMojo mojo = newMojo();
    assertTrue("empty by default", mojo.listScanFiles().isEmpty());
    final File artifactFile = new File(testOutDir, "scan-artifact-file.zip");
    FileUtils.touch(artifactFile);
    final File fileFile = new File(testOutDir, "scan-file-file.zip");
    FileUtils.touch(fileFile);
    final Dependency dependency = new DependencyFilter()
            .withGroupId("com.example")
            .withArtifactId("scan-artifact-file")
            .withVersion("1.0-SNAPSHOT")
            .withType("zip")
            .toDependency();
    mojo.scanArtifacts = Collections.singletonList(dependency);
    mojo.scanFiles = Collections.singletonList(fileFile);
    final MavenSession session = mock(MavenSession.class);
    mojo.session = session;
    final MavenExecutionRequest executionRequest = mock(MavenExecutionRequest.class);
    when(session.getRequest()).thenReturn(executionRequest);
    final RepositorySystem repositorySystem = mock(RepositorySystem.class);
    mojo.repositorySystem = repositorySystem;
    final Artifact scanArtifact = mock(Artifact.class);
    when(scanArtifact.getFile()).thenReturn(artifactFile);
    when(repositorySystem.createDependencyArtifact(dependency)).thenReturn(scanArtifact);
    final List<File> scanFiles = mojo.listScanFiles();
    assertEquals("expect files", Arrays.asList(artifactFile, fileFile), scanFiles);
}