@Test public void execute() throws MojoFailureException, MojoExecutionException, IOException { MuleContentGenerator contentGeneratorMock = mock(MuleContentGenerator.class); doReturn(contentGeneratorMock).when(mojoMock).getContentGenerator(); doCallRealMethod().when(mojoMock).execute(); doCallRealMethod().when(mojoMock).doExecute(); mojoMock.execute(); verify(mojoMock, times(1)).getContentGenerator(); verify(contentGeneratorMock, times(1)).createTestFolderContent(); }
@Override public void doExecute() throws MojoFailureException { getLog().debug("Generating mule source code..."); try { getContentGenerator().createContent(); } catch (IllegalArgumentException | IOException e) { throw new MojoFailureException("Fail to generate sources", e); } }
GenerateSourcesMojo extends AbstractMuleMojo { @Override public void doExecute() throws MojoFailureException { getLog().debug("Generating mule source code..."); try { getContentGenerator().createContent(); } catch (IllegalArgumentException | IOException e) { throw new MojoFailureException("Fail to generate sources", e); } } }
GenerateSourcesMojo extends AbstractMuleMojo { @Override public void doExecute() throws MojoFailureException { getLog().debug("Generating mule source code..."); try { getContentGenerator().createContent(); } catch (IllegalArgumentException | IOException e) { throw new MojoFailureException("Fail to generate sources", e); } }  }
GenerateSourcesMojo extends AbstractMuleMojo { @Override public void doExecute() throws MojoFailureException { getLog().debug("Generating mule source code..."); try { getContentGenerator().createContent(); } catch (IllegalArgumentException | IOException e) { throw new MojoFailureException("Fail to generate sources", e); } }  @Override void doExecute(); @Override String getPreviousRunPlaceholder(); }
GenerateSourcesMojo extends AbstractMuleMojo { @Override public void doExecute() throws MojoFailureException { getLog().debug("Generating mule source code..."); try { getContentGenerator().createContent(); } catch (IllegalArgumentException | IOException e) { throw new MojoFailureException("Fail to generate sources", e); } }  @Override void doExecute(); @Override String getPreviousRunPlaceholder();  }