public Tenant getTenant(TenantName tenantName) {
        return tenants.get(tenantName);
    }
@Test
    public void testListenersAdded() throws IOException, SAXException {
        TenantApplications applicationRepo = tenantRepository.getTenant(tenant1).getApplicationRepo();
        ApplicationId id = ApplicationId.from(tenant1, ApplicationName.defaultName(), InstanceName.defaultName());
        applicationRepo.createApplication(id);
        try (var transaction = new CuratorTransaction(curator)) {
            applicationRepo.createWriteActiveTransaction(transaction, id, 4).commit();
        }
        applicationRepo.activateApplication(ApplicationVersions.from(new Application(new VespaModel(MockApplicationPackage.createEmpty()),
                                                                                     new ServerCache(),
                                                                                     4L,
                                                                                     new Version(1, 2, 3),
                                                                                     MetricUpdater.createTestUpdater(),
                                                                                     id)),
                                            4);
        assertEquals(1, listener.activated.get());
    }