@Test public void executeShouldOutputMessage() throws Exception { new ReflectionHelper(echoMojo).setField("message", "Björn"); new ReflectionHelper(echoMojo, AbstractMojo.class).setField(pluginLogMock); echoMojo.execute(); verify(pluginLogMock).info("Björn"); verifyNoMoreInteractions(pluginLogMock); }
@Override public void execute() throws MojoFailureException { initLoggers(); if (skip) { mavenLogger.info("Skipping echo-maven-plugin"); } else { setup(); echo(); } }
EchoMojo extends AbstractMojo { @Override public void execute() throws MojoFailureException { initLoggers(); if (skip) { mavenLogger.info("Skipping echo-maven-plugin"); } else { setup(); echo(); } } }
EchoMojo extends AbstractMojo { @Override public void execute() throws MojoFailureException { initLoggers(); if (skip) { mavenLogger.info("Skipping echo-maven-plugin"); } else { setup(); echo(); } }  }
EchoMojo extends AbstractMojo { @Override public void execute() throws MojoFailureException { initLoggers(); if (skip) { mavenLogger.info("Skipping echo-maven-plugin"); } else { setup(); echo(); } }  @Override void execute(); }
EchoMojo extends AbstractMojo { @Override public void execute() throws MojoFailureException { initLoggers(); if (skip) { mavenLogger.info("Skipping echo-maven-plugin"); } else { setup(); echo(); } }  @Override void execute();  }