@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); }
public static void add(String group, List<String> users) { netgroupToUsersMap.put(group, new HashSet<String>(users)); netgroupToUsersMapUpdated = true; }
NetgroupCache { public static void add(String group, List<String> users) { netgroupToUsersMap.put(group, new HashSet<String>(users)); netgroupToUsersMapUpdated = true; } }
NetgroupCache { public static void add(String group, List<String> users) { netgroupToUsersMap.put(group, new HashSet<String>(users)); netgroupToUsersMapUpdated = true; }  }
NetgroupCache { public static void add(String group, List<String> users) { netgroupToUsersMap.put(group, new HashSet<String>(users)); netgroupToUsersMapUpdated = true; }  static void getNetgroups(final String user,
      List<String> groups); static List<String> getNetgroupNames(); static boolean isCached(String group); static void clear(); static void add(String group, List<String> users); }
NetgroupCache { public static void add(String group, List<String> users) { netgroupToUsersMap.put(group, new HashSet<String>(users)); netgroupToUsersMapUpdated = true; }  static void getNetgroups(final String user,
      List<String> groups); static List<String> getNetgroupNames(); static boolean isCached(String group); static void clear(); static void add(String group, List<String> users);  }