InstanceResource { @GET @Path("/{instanceId}/slobrok") @Produces(MediaType.APPLICATION_JSON) public List<SlobrokEntryResponse> getSlobrokEntries( @PathParam("instanceId") String instanceId, @QueryParam("pattern") String pattern) { ApplicationInstanceReference reference = parseInstanceId(instanceId); ApplicationId applicationId = OrchestratorUtil.toApplicationId(reference); if (pattern == null) { pattern = DEFAULT_SLOBROK_PATTERN; } List<Mirror.Entry> entries = slobrokApi.lookup(applicationId, pattern); return entries.stream() .map(entry -> new SlobrokEntryResponse(entry.getName(), entry.getSpecString())) .collect(Collectors.toList()); } @Inject  InstanceResource(@Component ServiceMonitor serviceMonitor,
                            @Component StatusService statusService,
                            @Component SlobrokApi slobrokApi,
                            @Component UnionMonitorManager rootManager); @GET @Produces(MediaType.APPLICATION_JSON) List<ApplicationInstanceReference> getAllInstances(); @GET @Path("/{instanceId}") @Produces(MediaType.APPLICATION_JSON) InstanceStatusResponse getInstance(@PathParam("instanceId") String instanceIdString); @GET @Path("/{instanceId}/slobrok") @Produces(MediaType.APPLICATION_JSON) List<SlobrokEntryResponse> getSlobrokEntries(
            @PathParam("instanceId") String instanceId,
            @QueryParam("pattern") String pattern); @GET @Path("/{instanceId}/serviceStatusInfo") @Produces(MediaType.APPLICATION_JSON) ServiceStatusInfo getServiceStatus(
            @PathParam("instanceId") String instanceId,
            @QueryParam("clusterId") String clusterIdString,
            @QueryParam("serviceType") String serviceTypeString,
            @QueryParam("configId") String configIdString); static final String DEFAULT_SLOBROK_PATTERN; }
@Test public void testGetSlobrokEntries() throws Exception { testGetSlobrokEntriesWith("foo", "foo"); }