@Test public void findGroupByName() {

  Group group = new Group(50, "testGroup", "testing group", now, "automation client", now,
      "automation client", ImmutableMap.of("app", "keywhiz"));
  when(groupDAO.getGroup("testGroup")).thenReturn(Optional.of(group));
  when(aclDAO.getClientsFor(group)).thenReturn(ImmutableSet.of());
  when(aclDAO.getSanitizedSecretsFor(group)).thenReturn(ImmutableSet.of());
  GroupDetailResponse expectedResponse = GroupDetailResponse.fromGroup(group,
      ImmutableList.of(), ImmutableList.of());
  Response response = resource.getGroupByName(automation, Optional.of("testGroup"));
  assertThat(response.getEntity()).isEqualTo(expectedResponse);
}