AdjunctResource extends AbstractBrooklynRestResource implements AdjunctApi { @Override public List<ConfigSummary> listConfig( final String application, final String entityToken, final String adjunctToken) { Entity entity = brooklyn().getEntity(application, entityToken); EntityAdjunct adjunct = brooklyn().getAdjunct(entity, adjunctToken); List<ConfigSummary> result = Lists.newArrayList(); for (ConfigKey<?> key : adjunct.config().findKeysDeclared(Predicates.alwaysTrue())) { result.add(ConfigTransformer.of(key).on(entity, adjunct).includeLinks(ui.getBaseUriBuilder(), false, true).transform()); } return result; }  @Override List<AdjunctSummary> list(String application, String entityToken, String adjunctType); @SuppressWarnings({ "rawtypes", "unchecked" }) @Override AdjunctDetail addAdjunct(String application, String entityToken, String adjunctTypeName, Map<String, String> config); @Override AdjunctDetail get(String application, String entityToken, String adjunctId); @Override Status getStatus(String application, String entityToken, String adjunctId); @Override Response start(String application, String entityToken, String adjunctId); @Override Response stop(String application, String entityToken, String adjunctId); @Override Response destroy(String application, String entityToken, String adjunctId); @Override List<ConfigSummary> listConfig(
            final String application, final String entityToken, final String adjunctToken); @Override Map<String, Object> batchConfigRead(String application, String entityToken, String adjunctToken); @Override String getConfig(String application, String entityToken, String adjunctToken, String configKeyName); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Response setConfig(String application, String entityToken, String adjunctToken, String configKeyName, Object value); @Override List<TaskSummary> listTasks(String applicationId, String entityId, String adjunctToken, int limit, Boolean recurse); @Override Response getIcon(String applicationId, String entityId, String adjunctToken);  }
@Test public void testListConfig() throws Exception { Set<ConfigSummary> config = client().path(ENDPOINT + policyId + "/config") .get(new GenericType<Set<ConfigSummary>>() {}); Set<String> configNames = Sets.newLinkedHashSet(); for (ConfigSummary conf : config) { configNames.add(conf.getName()); } assertEquals(configNames, ImmutableSet.of( RestMockSimplePolicy.SAMPLE_CONFIG.getName(), RestMockSimplePolicy.INTEGER_CONFIG.getName())); }