@Test
    public void testRedeploy() {
        DeployTester tester = new DeployTester.Builder(temporaryFolder).build();
        tester.deployApp("src/test/apps/app");
        Optional<com.yahoo.config.provision.Deployment> deployment = tester.redeployFromLocalActive();

        assertTrue(deployment.isPresent());
        long activeSessionIdBefore = tester.applicationRepository().getActiveSession(tester.applicationId()).get().getSessionId();
        assertEquals(tester.applicationId(), tester.tenant().getSessionRepository().getLocalSession(activeSessionIdBefore).getApplicationId());
        deployment.get().activate();
        long activeSessionIdAfter =  tester.applicationRepository().getActiveSession(tester.applicationId()).get().getSessionId();
        assertEquals(activeSessionIdAfter, activeSessionIdBefore + 1);
        assertEquals(tester.applicationId(), tester.tenant().getSessionRepository().getLocalSession(activeSessionIdAfter).getApplicationId());
    }
Tests redeploying of an already existing application.

@author bratseth
configserver/src/test/java/com/yahoo/vespa/config/server/deploy/RedeployTest.java