@Test
public void isResultExceptionIfNonZeroExitCodeAndNoInvokerException() throws MavenInvocationException {

    InvocationResult r = Mockito.mock(InvocationResult.class);
    IllegalStateException e = new IllegalStateException("exception");
    Mockito.when(multipleOutputHandler.getResult()).thenThrow(e);
    Mockito.when(r.getExitCode()).thenReturn(1);
    Mockito.when(r.getExecutionException()).thenReturn(null);
    Mockito.when(invoker.execute(request)).thenReturn(r);
    TUExecutionResult result = mavenGoal.execution(new File("/blah/pom.xml"), null);
    assertEquals(result.getException(), e);
    assertEquals(result.getValue(), null);
}