  @Test
  public void testSimpleOneModule()
      throws MavenExecutionException
  {

    final Model model = createModel("org.foo", "simple");
    // deploy defined as "usual"
    model.getBuild().getPlugins().add(
        createPlugin(DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_GROUP_ID,
            DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_ARTIFACT_ID, "deploy"));
    // out plugin just declared as extension, nothing more. no goals
    model.getBuild().getPlugins().add(
        createPlugin(DeployLifecycleParticipant._THIS_GROUP_ID, DeployLifecycleParticipant._THIS_ARTIFACT_ID));

    final MavenSession mockSession = createSessionWithProjectsForModels(model);

    defaultLifecycleParticipant.afterProjectsRead(mockSession);

    // aftermath: deploy plugin should executions removed, nexus-maven-plugin should have executions added
    for (Plugin plugin : mockSession.getProjects().get(0).getModel().getBuild().getPlugins()) {
      if (DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_ARTIFACT_ID.equals(plugin.getArtifactId())) {
        Assert.assertTrue("No executions for plugin "
            + DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_ARTIFACT_ID, plugin.getExecutions().isEmpty());
      }
      else if (DeployLifecycleParticipant._THIS_ARTIFACT_ID.equals(plugin.getArtifactId())) {
        Assert.assertEquals("One execution for plugin " + DeployLifecycleParticipant._THIS_ARTIFACT_ID, 1,
            plugin.getExecutions().size());
      }
      else {
        // wtf? we did not add any other plugin
        Assert.fail("Unknown plugin (): " + plugin.getGroupId() + ":" + plugin.getArtifactId());
      }
    }
    // logging should happen
    Assert.assertTrue("Missing log?", fakeLogger.getLoggedStuff().contains("Installing Nexus Staging"));
    Assert.assertTrue("Wrong count reported?", fakeLogger.getLoggedStuff().contains("... total of 1"));
  }