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