class AutomationGroupResource {

  @Timed @ExceptionMetered
  @GET
  @Path("{groupId}")
  public GroupDetailResponse getGroupById(
      @Auth AutomationClient automationClient,
      @PathParam("groupId") LongParam groupId) {
    Group group = groupDAO.getGroupById(groupId.get()).orElseThrow(NotFoundException::new);

    ImmutableList<Client> clients = ImmutableList.copyOf(aclDAO.getClientsFor(group));
    ImmutableList<SanitizedSecret> sanitizedSecrets =
        ImmutableList.copyOf(aclDAO.getSanitizedSecretsFor(group));
    return GroupDetailResponse.fromGroup(group, sanitizedSecrets, clients);
  }

  @Inject public  AutomationGroupResource(GroupDAOFactory groupDAOFactory, AclDAOFactory aclDAOFactory,
      AuditLog auditLog);
  @VisibleForTesting  AutomationGroupResource(GroupDAO groupDAO, AclDAO aclDAO, AuditLog auditLog);

}