@Test(expected = MojoExecutionException.class)
public void testExecute_failToAssemble() throws Exception {

    final OpearPackageMojo mojo = newMojo();
    final MavenProject project = mock(MavenProject.class);
    when(project.clone()).thenReturn(project);
    mojo.project = project;
    final MavenSession session = mock(MavenSession.class);
    mojo.session = session;
    final MavenExecutionRequest executionRequest = mock(MavenExecutionRequest.class);
    when(session.getRequest()).thenReturn(executionRequest);
    mojo.execute();
}