public Tenant addTenant(TenantName tenantName) {
        try (Lock lock = tenantLocks.lock(tenantName)) {
            writeTenantPath(tenantName);
            return createTenant(tenantName, clock.instant());
        }
    }
@Test
    public void testAddTenant() throws Exception {
        Set<TenantName> allTenants = tenantRepository.getAllTenantNames();
        assertTrue(allTenants.contains(tenant1));
        assertTrue(allTenants.contains(tenant2));
        tenantRepository.addTenant(tenant3);
        assertZooKeeperTenantPathExists(tenant3);
        allTenants = tenantRepository.getAllTenantNames();
        assertTrue(allTenants.contains(tenant1));
        assertTrue(allTenants.contains(tenant2));
        assertTrue(allTenants.contains(tenant3));
    }