public Optional<Session> getActiveSession(ApplicationId applicationId) {
        return getActiveSession(getTenant(applicationId), applicationId);
    }
@Test
    public void testThatPreviousSessionIsDeactivated() {
        deployApp(testAppJdiscOnly);
        Session firstSession = applicationRepository.getActiveSession(applicationId()).get();

        deployApp(testAppJdiscOnly);

        assertEquals(DEACTIVATE, firstSession.getStatus());
    }