ClientResource { @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) public Iterable<String> clientListing(@Auth AutomationClient automationClient) { return clientDAOReadOnly.getClients().stream() .map(Client::getName) .collect(toSet()); } @Inject  ClientResource(AclDAOFactory aclDAOFactory, ClientDAOFactory clientDAOFactory,
      GroupDAOFactory groupDAOFactory, AuditLog auditLog); @Timed @ExceptionMetered @POST @Consumes(APPLICATION_JSON) Response createClient(@Auth AutomationClient automationClient,
      @Valid CreateClientRequestV2 request); @Timed @ExceptionMetered @GET @Produces(APPLICATION_JSON) Iterable<String> clientListing(@Auth AutomationClient automationClient); @Timed @ExceptionMetered @GET @Path("{name}") @Produces(APPLICATION_JSON) ClientDetailResponseV2 clientInfo(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @GET @Path("{name}/groups") @Produces(APPLICATION_JSON) Iterable<String> clientGroupsListing(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @PUT @Path("{name}/groups") @Produces(APPLICATION_JSON) Iterable<String> modifyClientGroups(@Auth AutomationClient automationClient,
      @PathParam("name") String name, @Valid ModifyGroupsRequestV2 request); @Timed @ExceptionMetered @GET @Path("{name}/secrets") @Produces(APPLICATION_JSON) Iterable<String> clientSecretsListing(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @DELETE @Path("{name}") Response deleteClient(@Auth AutomationClient automationClient,
      @PathParam("name") String name); @Timed @ExceptionMetered @POST @Path("{name}") @Consumes(APPLICATION_JSON) @Produces(APPLICATION_JSON) ClientDetailResponseV2 modifyClient(@Auth AutomationClient automationClient,
      @PathParam("name") String currentName, @Valid ModifyClientRequestV2 request);  }
@Test public void clientListing() throws Exception { Set<String> clientsBefore = listing(); Set<String> expected = ImmutableSet.<String>builder() .addAll(clientsBefore) .add("client4") .build(); create(CreateClientRequestV2.builder().name("client4").build()); assertThat(listing()).containsAll(expected); }