@Test public void listingOfGroups() {

  Group group1 = new Group(1, "group1", "desc", now, "creator", now, "updater", ImmutableMap.of(
      "app", "app"));
  Group group2 = new Group(2, "group2", "desc", now, "creator", now, "updater",
      ImmutableMap.of("app", "app"));
  when(groupDAO.getGroups()).thenReturn(ImmutableSet.of(group1, group2));
  List<Group> response = resource.listGroups(user);
  assertThat(response).containsOnly(group1, group2);
}