@Test
public void testGetMembership() {

    TopLevelDomain dom1 = createTopLevelDomainObject("MbrGetRoleDom1",
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Role role1 = createRoleObject("MbrGetRoleDom1", "Role1", null,
            "user.joe", "user.jane");
    zms.putRole(mockDomRsrcCtx, "MbrGetRoleDom1", "Role1", auditRef, role1);
    Membership member1 = zms.getMembership(mockDomRsrcCtx, "MbrGetRoleDom1", "Role1",
            "user.joe", null);
    assertNotNull(member1);
    assertEquals(member1.getMemberName(), "user.joe");
    assertEquals(member1.getRoleName(), "MbrGetRoleDom1:role.Role1".toLowerCase());
    assertTrue(member1.getIsMember());
    Membership member2 = zms.getMembership(mockDomRsrcCtx, "MbrGetRoleDom1", "Role1",
            "user.doe", null);
    assertNotNull(member2);
    assertEquals(member2.getMemberName(), "user.doe");
    assertEquals(member2.getRoleName(), "MbrGetRoleDom1:role.Role1".toLowerCase());
    assertFalse(member2.getIsMember());
    zms.deleteTopLevelDomain(mockDomRsrcCtx,"MbrGetRoleDom1", auditRef);
}