AlchemyClient { public TreatmentDto getTreatment(String experimentName, String treatmentName) { return resource( ENDPOINT_TREATMENT, ImmutableMap.of( PARAM_EXPERIMENT_NAME, experimentName, PARAM_TREATMENT_NAME, treatmentName ) ).get(TreatmentDto.class); } AlchemyClient(AlchemyClientConfiguration configuration, Environment environment);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService,
                         ObjectMapper objectMapper);  AlchemyClient(AlchemyClientConfiguration configuration,
                         ExecutorService executorService);  AlchemyClient(AlchemyClientConfiguration configuration); List<ExperimentDto> getExperiments(); GetExperimentsRequestBuilder getExperimentsFiltered(); ExperimentDto getExperiment(String experimentName); List<AllocationDto> getAllocations(String experimentName); List<TreatmentDto> getTreatments(String experimentName); TreatmentDto getTreatment(String experimentName, String treatmentName); List<TreatmentOverrideDto> getOverrides(String experimentName); TreatmentOverrideDto getOverride(String experimentName, String overrideName); CreateExperimentRequestBuilder createExperiment(String experimentName); void addTreatment(String experimentName, String treatmentName, String description); void addTreatment(String experimentName, String treatmentName); void addOverride(String experimentName,
                            String overrideName,
                            String treatmentName,
                            String filter); UpdateExperimentRequestBuilder updateExperiment(String experimentName); UpdateAllocationsRequestBuilder updateAllocations(String experimentName); TreatmentDto getActiveTreatment(String experimentName, IdentityDto identity); Map<String, TreatmentDto> getActiveTreatments(IdentityDto identity); void deleteExperiment(String experimentName); void clearAllocations(String experimentName); void removeTreatment(String experimentName, String treatmentName); UpdateTreatmentRequestBuilder updateTreatment(String experimentName, String treatmentName); void clearTreatments(String experimentName); void clearOverrides(String experimentName); void removeOverride(String experimentName, String overrideName); Map<String, Class<? extends IdentityDto>> getIdentityTypes(); JsonSchema getIdentitySchema(String identityType); Set<String> getIdentityAttributes(String identityType);  }
@Test public void testGetTreatment() { client .createExperiment("exp") .addTreatment("control", "the control") .apply(); final TreatmentDto treatment = client.getTreatment("exp", "control"); assertEquals("control", treatment.getName()); assertEquals("the control", treatment.getDescription()); }