PolicyResource extends AbstractBrooklynRestResource implements PolicyApi { @Override public Status getStatus(String application, String entityToken, String policyId) { Policy policy = brooklyn().getPolicy(application, entityToken, policyId); return ApplicationTransformer.statusFromLifecycle(Policies.getPolicyStatus(policy)); }  @Override List<PolicySummary> list( final String application, final String entityToken ); @Override Map<String, Boolean> batchConfigRead( String application, String entityToken); @SuppressWarnings("unchecked") @Override PolicySummary addPolicy( String application,String entityToken, String policyTypeName,
            Map<String, String> config); @Override Status getStatus(String application, String entityToken, String policyId); @Override Response start( String application, String entityToken, String policyId); @Override Response stop(String application, String entityToken, String policyId); @Override Response destroy(String application, String entityToken, String policyToken);  }
@Test(dependsOnMethods = "testGetDefaultValue") public void testReconfigureConfig() throws Exception { String configName = RestMockSimplePolicy.SAMPLE_CONFIG.getName(); Response response = client().path(ENDPOINT + policyId + "/config/" + configName) .post(toJsonEntity("newval")); assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); }