@Test
public void testIsUserAuthorityValueChanged() {

    Authority savedAuthority = zms.dbService.zmsConfig.getUserAuthority();
    // with authority null - always false
    zms.dbService.zmsConfig.setUserAuthority(null);
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("filter1", "filter2"));
    Authority authority = Mockito.mock(Authority.class);
    zms.dbService.zmsConfig.setUserAuthority(authority);
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("old", null));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged(null, null));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("", null));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("", ""));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("old", "old"));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged("old", ""));
    assertFalse(zms.dbService.isUserAuthorityExpiryChanged(null, ""));
    assertTrue(zms.dbService.isUserAuthorityExpiryChanged("old", "new"));
    assertTrue(zms.dbService.isUserAuthorityExpiryChanged(null, "new"));
    assertTrue(zms.dbService.isUserAuthorityExpiryChanged("", "new"));
    zms.dbService.zmsConfig.setUserAuthority(savedAuthority);
}