@Test
public void testExecutePrepare() throws Exception {

    Mockito.when(ctx.getPhase()).thenReturn(Phase.PREPARE);
    Mockito.when(ctx.getPackage().getId().getName()).thenReturn("testVaultPackage");
    Mockito.when(ctx.getPackage().getId().getGroup()).thenReturn("testVaultGroup");
    Mockito.when(ctx.getPackage().getId().getInstallationPath()).thenReturn("/test/installation/path");
    Mockito.when(ctx.getPackage().getId().getVersionString()).thenReturn("1.0.1-SNAPSHOT");
    sling.build().resource("/test/installation/path.zip/jcr:content/vlt:definition/upgrader/test", //
            "handler", "biz.netcentric.vlt.upgrade.UpgradeProcessorTest$TestHandler" //
    );
    processor.execute(ctx);
    Assert.assertEquals(1, processor.infos.size());
    Assert.assertTrue(processor.infos.get(0).getHandler() instanceof TestHandler);
    TestHandler handler = (TestHandler) processor.infos.get(0).getHandler();
    Mockito.verify(handler.action).execute(ctx);
}