@Test
public void testGetGroupMembership() {

    final String domainName = "get-group-mbr";
    final String groupName = "group1";
    TopLevelDomain dom1 = createTopLevelDomainObject(domainName, "Test Domain1", "testOrg", adminUser);
    zms.postTopLevelDomain(mockDomRsrcCtx, auditRef, dom1);
    // inconsistent group name
    Group group1 = createGroupObject(domainName, groupName, "user.joe", "user.jane");
    zms.putGroup(mockDomRsrcCtx, domainName, groupName, auditRef, group1);
    GroupMembership mbr = zms.getGroupMembership(mockDomRsrcCtx, domainName, groupName, "user.joe", null);
    assertNotNull(mbr);
    assertTrue(mbr.getIsMember());
    assertTrue(mbr.getApproved());
    assertEquals(mbr.getGroupName(), domainName + ":group." + groupName);
    assertEquals(mbr.getMemberName(), "user.joe");
    mbr = zms.getGroupMembership(mockDomRsrcCtx, domainName, groupName, "user.jane", null);
    assertNotNull(mbr);
    assertTrue(mbr.getIsMember());
    assertTrue(mbr.getApproved());
    assertEquals(mbr.getGroupName(), domainName + ":group." + groupName);
    assertEquals(mbr.getMemberName(), "user.jane");
    zms.deleteTopLevelDomain(mockDomRsrcCtx,domainName, auditRef);
}