@Test
public void testIsUserAuthorityFilterChanged() {

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