@Test
public void testGetUpdatedSignedDomains() throws InterruptedException, IOException, KeyRefresherException {

    MockZMSFileMTLSChangeLogStore store = new MockZMSFileMTLSChangeLogStore(FSTORE_PATH, keyPath, certPath,
            trustStorePath, trustStorePassword);
    MockZMSFileChangeLogStoreCommon cstore = new MockZMSFileChangeLogStoreCommon(FSTORE_PATH);
    store.setChangeLogStoreCommon(cstore);
    List<SignedDomain> domains = new ArrayList<>();
    DomainData domData = new DomainData().setName("athenz");
    SignedDomain domain = new SignedDomain().setDomain(domData);
    domains.add(domain);
    SignedDomains signedDomains = new SignedDomains().setDomains(domains);
    store.setSignedDomains(signedDomains);
    StringBuilder str = new StringBuilder();
    assertNull(store.getUpdatedSignedDomains(str));
    // now let's set the tag header
    cstore.setTagHeader(Timestamp.fromCurrentTime().toString());
    SignedDomains retDoamins = store.getUpdatedSignedDomains(str);
    assertNotNull(retDoamins);
    assertEquals(retDoamins.getDomains().size(), 1);
    assertEquals(retDoamins.getDomains().get(0).getDomain().getName(), "athenz");
    // now set the signed domains to be null
    store.setSignedDomains(null);
    str.setLength(0);
    assertNull(store.getUpdatedSignedDomains(str));
}