@Test
public void scan() throws IOException, MojoFailureException, MojoExecutionException {

    final CrestCommandLoaderDescriptorGeneratorMojo mojo = new CrestCommandLoaderDescriptorGeneratorMojo();
    mojo.classes = new File("target/test-classes");
    mojo.output = new File("target/CrestCommandLoaderDescriptorGeneratorMojoTest/test.txt");
    mojo.execute();
    final BufferedReader reader = new BufferedReader(new FileReader(mojo.output));
    final Collection<String> found = new HashSet<>();
    String line;
    while ((line = reader.readLine()) != null) {
        found.add(line);
    }
    reader.close();
    assertEquals(new HashSet<String>() {{ add(ClassCommand.class.getName()); add(MethodCommand.class.getName()); }}, found);
}