@Test
public void testGetUserAuthorityExpiryAttr() {

    Role role = new Role().setUserAuthorityExpiration("elevated-clearance");
    Authority savedAuthority = zms.userAuthority;
    zms.userAuthority = null;
    // with authority null we always get null
    assertNull(zms.getUserAuthorityExpiryAttr(role.getUserAuthorityExpiration()));
    zms.userAuthority = Mockito.mock(Authority.class);
    assertEquals("elevated-clearance", zms.getUserAuthorityExpiryAttr(role.getUserAuthorityExpiration()));
    role.setUserAuthorityExpiration("");
    assertNull(zms.getUserAuthorityExpiryAttr(role.getUserAuthorityExpiration()));
    role.setUserAuthorityExpiration(null);
    assertNull(zms.getUserAuthorityExpiryAttr(role.getUserAuthorityExpiration()));
    zms.userAuthority = savedAuthority;
}