@Test public void noMessageShouldGenerateException() throws Exception { expectedException.expect(MojoFailureException.class); expectedException.expectMessage("There was nothing to output. Specify either message or fromFile"); echoMojo.execute(); verifyNoMoreInteractions(mavenLoggerMock); verifyNoMoreInteractions(mavenEchoOutputMock); }
@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();  }