@Test
public void testDeleteGroupMembership() {

    final String domainName = "del-group-mbr";
    final String groupName = "group1";
    TopLevelDomain dom1 = createTopLevelDomainObject(domainName, "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    Group group1 = createGroupObject(domainName, groupName, "user.joe", "user.jane");
    zms.putGroup(mockDomRsrcCtx, domainName, groupName, auditRef, group1);
    zms.deleteGroupMembership(mockDomRsrcCtx, domainName, groupName, "user.joe", auditRef);
    Group group = zms.getGroup(mockDomRsrcCtx, domainName, groupName, false, false);
    assertNotNull(group);
    List<GroupMember> members = group.getGroupMembers();
    assertNotNull(members);
    assertEquals(members.size(), 1);
    boolean found = false;
    for (GroupMember 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, domainName, auditRef);
}