@Test
public void testMembership() {

  List<String> users = new ArrayList<String>();
  users.add(USER1);
  users.add(USER2);
  NetgroupCache.add(GROUP1, users);
  users = new ArrayList<String>();
  users.add(USER1);
  users.add(USER3);
  NetgroupCache.add(GROUP2, users);
  verifyGroupMembership(USER1, 2, GROUP1);
  verifyGroupMembership(USER1, 2, GROUP2);
  verifyGroupMembership(USER2, 1, GROUP1);
  verifyGroupMembership(USER3, 1, GROUP2);
}