ZMSFileChangeLogStore implements ChangeLogStore { @Override public Set<String> getServerDomainList() { Set<String> zmsDomainList; try (ZMSClient zmsClient = getZMSClient()) { zmsDomainList = changeLogStoreCommon.getServerDomainList(zmsClient); } catch (ZMSClientException ex) { LOGGER.error("Unable to retrieve domain list from ZMS", ex); return null; } if (LOGGER.isDebugEnabled()) { LOGGER.debug("Number of ZMS domains: {}", zmsDomainList.size()); } return zmsDomainList; } ZMSFileChangeLogStore(String rootDirectory, PrivateKey privateKey, String privateKeyId); @Override boolean supportsFullRefresh(); @Override SignedDomain getLocalSignedDomain(String domainName); @Override SignedDomain getServerSignedDomain(String domainName); @Override void removeLocalDomain(String domainName); @Override void saveLocalDomain(String domainName, SignedDomain signedDomain); @Override List<String> getLocalDomainList(); ZMSClient getZMSClient(); @Override Set<String> getServerDomainList(); @Override SignedDomains getServerDomainModifiedList(); @Override void setLastModificationTimestamp(String newLastModTime); @Override SignedDomains getUpdatedSignedDomains(StringBuilder lastModTimeBuffer); void setChangeLogStoreCommon(ZMSFileChangeLogStoreCommon changeLogStoreCommon);  }
@Test public void testGetServerDomainList() { MockZMSFileChangeLogStore fstore = new MockZMSFileChangeLogStore(FSTORE_PATH, null, null); MockZMSFileChangeLogStoreCommon storeCommon = new MockZMSFileChangeLogStoreCommon(FSTORE_PATH); fstore.setChangeLogStoreCommon(storeCommon); Set<String> domainList = fstore.getServerDomainList(); assertTrue(domainList.contains("user")); fstore.setDomainList(null); assertNull(fstore.getServerDomainList()); }