@Test
public void testExecute() throws Exception {

    CreateMojo mojo = (CreateMojo) rule.lookupConfiguredMojo(mavenProject, "create");
    assertThat(mojo, notNullValue());
    mojo.execute();
    Path generatedDataDir = targetDir.resolve("plugin-generator");
    assertThat(generatedDataDir, exists());
    assertThat(generatedDataDir, isDirectory());
    Path pluginFile = generatedDataDir.resolve("plugin-test-1.0.jar");
    assertThat(pluginFile, exists());
    assertThat(pluginFile, isRegularFile());
    Path pluginDataDir = generatedDataDir.resolve("data");
    assertThat(pluginDataDir, exists());
    assertThat(pluginDataDir, isDirectory());
    Path libDir = pluginDataDir.resolve("lib");
    assertThat(libDir, exists());
    assertThat(libDir, isDirectory());
    Path dependencyFile = libDir.resolve(ARTIFACT_FILE);
    assertThat(dependencyFile, exists());
    assertThat(dependencyFile, isRegularFile());
}