@Test
public void testDeleteMembership() {

    TopLevelDomain dom1 = createTopLevelDomainObject("MbrDelDom1",
            "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Role role1 = createRoleObject("MbrDelDom1", "Role1", null,
            "user.joe", "user.jane");
    zms.putRole(mockDomRsrcCtx, "MbrDelDom1", "Role1", auditRef, role1);
    zms.deleteMembership(mockDomRsrcCtx, "MbrDelDom1", "Role1", "user.joe", auditRef);
    Role role = zms.getRole(mockDomRsrcCtx, "MbrDelDom1", "Role1", false, false, false);
    assertNotNull(role);
    List<RoleMember> members = role.getRoleMembers();
    assertNotNull(members);
    assertEquals(members.size(), 1);
    boolean found = false;
    for (RoleMember member: members) {
        if (member.getMemberName().equalsIgnoreCase("user.joe")) {
            fail("delete user.joe failed");
        }
        if (member.getMemberName().equalsIgnoreCase("user.jane")) {
            found = true;
        }
    }
    if (!found) {
        fail("user.jane not found");
    }
    zms.deleteTopLevelDomain(mockDomRsrcCtx, "MbrDelDom1", auditRef);
}