@Test public void groupIncludesClientsAndSecrets() {

  Group group = new Group(50, "testGroup", "testing group", now, "automation client", now,
      "automation client", ImmutableMap.of("app", "keywhiz"));
  Client groupClient =
      new Client(1, "firstClient", "Group client", null, now, "test", now, "test", null, null, true,
          true);
  SanitizedSecret firstGroupSecret =
      SanitizedSecret.of(1, "name1", "desc", "checksum", now, "test", now, "test", null, "", null, 1136214245, 125L, now, "test");
  SanitizedSecret secondGroupSecret =
      SanitizedSecret.of(2, "name2", "desc", "checksum", now, "test", now, "test", null, "", null, 1136214245, 250L, now, "test");
  when(groupDAO.getGroup("testGroup")).thenReturn(Optional.of(group));
  when(aclDAO.getClientsFor(group)).thenReturn(ImmutableSet.of(groupClient));
  when(aclDAO.getSanitizedSecretsFor(group))
      .thenReturn(ImmutableSet.of(firstGroupSecret, secondGroupSecret));
  GroupDetailResponse expectedResponse = GroupDetailResponse.fromGroup(group,
      ImmutableList.of(firstGroupSecret, secondGroupSecret), ImmutableList.of(groupClient));
  Response response = resource.getGroupByName(automation, Optional.of("testGroup"));
  assertThat(response.getEntity()).isEqualTo(expectedResponse);
}