@Test(expected = PackageException.class)
public void testActionException() throws Exception {

    processor.infos = Arrays.asList(info);
    Mockito.when(ctx.getPhase()).thenReturn(Phase.INSTALLED);
    Mockito.when(info.getActions()).thenReturn(Collections.singletonMap(Phase.INSTALLED, Arrays.asList(action)));
    Mockito.when(action.isRelevant(ctx, info)).thenReturn(true);
    Mockito.doThrow(new RuntimeException("testException")).when(action).execute(ctx);
    try {
        processor.execute(ctx);
    } catch (Exception e) {
        Assert.assertTrue(info.getExecutedActions().isEmpty());
        throw e;
    }
}