@Test public void testGetOverride() throws ValidationException { final Treatment treatment = new Treatment("bar"); final TreatmentOverride override = new TreatmentOverride("override", FilterExpression.alwaysTrue(), treatment); final Experiment experiment = new Experiment(null, "foo") .addTreatment("bar") .addOverride("override", "bar", "true"); assertEquals(treatment, experiment.getTreatments().get(0)); assertEquals(override, experiment.getOverride(override.getName())); }
public TreatmentOverride getOverride(String overrideName) { return overrides.get(overrideName); }
Experiment implements Named { public TreatmentOverride getOverride(String overrideName) { return overrides.get(overrideName); } }
Experiment implements Named { public TreatmentOverride getOverride(String overrideName) { return overrides.get(overrideName); } private  Experiment(Experiments owner,
                       String name,
                       int seed,
                       String description,
                       FilterExpression filter,
                       Set<String> hashAttributes,
                       boolean active,
                       DateTime created,
                       DateTime modified,
                       DateTime activated,
                       DateTime deactivated,
                       Map<String, Treatment> treatments,
                       Iterable<TreatmentOverride> overrides,
                       Iterable<Allocation> allocations); protected  Experiment(Experiments owner, String name); private  Experiment(Experiment toCopy); }
Experiment implements Named { public TreatmentOverride getOverride(String overrideName) { return overrides.get(overrideName); } private  Experiment(Experiments owner,
                       String name,
                       int seed,
                       String description,
                       FilterExpression filter,
                       Set<String> hashAttributes,
                       boolean active,
                       DateTime created,
                       DateTime modified,
                       DateTime activated,
                       DateTime deactivated,
                       Map<String, Treatment> treatments,
                       Iterable<TreatmentOverride> overrides,
                       Iterable<Allocation> allocations); protected  Experiment(Experiments owner, String name); private  Experiment(Experiment toCopy); static Experiment copyOf(Experiment experiment); String getName(); String getDescription(); Experiment setDescription(String description); FilterExpression getFilter(); Set<String> getHashAttributes(); Experiment setFilter(FilterExpression filter); Experiment setHashAttributes(Set<String> hashAttributes); Experiment setHashAttributes(String ... hashAttributes); Experiment setSeed(int seed); int getSeed(); boolean isActive(); DateTime getCreated(); DateTime getModified(); DateTime getActivated(); DateTime getDeactivated(); List<Allocation> getAllocations(); List<Treatment> getTreatments(); Treatment getTreatment(String treatmentName); List<TreatmentOverride> getOverrides(); TreatmentOverride getOverride(String overrideName); Experiment activate(); Experiment deactivate(); Experiment addTreatment(String name); Experiment addTreatment(String name, String description); Experiment clearTreatments(); Experiment clearOverrides(); Experiment addOverride(String overrideName, String treatmentName, String filter); Experiment removeOverride(String overrideName); Experiment removeOverrides(String treatmentName); Experiment removeTreatment(String name); Experiment save(); void delete(); Experiment allocate(String treatmentName, int size); Experiment deallocate(String treatmentName, int size); Experiment reallocate(String sourceTreatmentName, String destinationTreatmentName, int size); Experiment deallocateAll(); Treatment getTreatment(Identity identity, AttributesMap attributes); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
Experiment implements Named { public TreatmentOverride getOverride(String overrideName) { return overrides.get(overrideName); } private  Experiment(Experiments owner,
                       String name,
                       int seed,
                       String description,
                       FilterExpression filter,
                       Set<String> hashAttributes,
                       boolean active,
                       DateTime created,
                       DateTime modified,
                       DateTime activated,
                       DateTime deactivated,
                       Map<String, Treatment> treatments,
                       Iterable<TreatmentOverride> overrides,
                       Iterable<Allocation> allocations); protected  Experiment(Experiments owner, String name); private  Experiment(Experiment toCopy); static Experiment copyOf(Experiment experiment); String getName(); String getDescription(); Experiment setDescription(String description); FilterExpression getFilter(); Set<String> getHashAttributes(); Experiment setFilter(FilterExpression filter); Experiment setHashAttributes(Set<String> hashAttributes); Experiment setHashAttributes(String ... hashAttributes); Experiment setSeed(int seed); int getSeed(); boolean isActive(); DateTime getCreated(); DateTime getModified(); DateTime getActivated(); DateTime getDeactivated(); List<Allocation> getAllocations(); List<Treatment> getTreatments(); Treatment getTreatment(String treatmentName); List<TreatmentOverride> getOverrides(); TreatmentOverride getOverride(String overrideName); Experiment activate(); Experiment deactivate(); Experiment addTreatment(String name); Experiment addTreatment(String name, String description); Experiment clearTreatments(); Experiment clearOverrides(); Experiment addOverride(String overrideName, String treatmentName, String filter); Experiment removeOverride(String overrideName); Experiment removeOverrides(String treatmentName); Experiment removeTreatment(String name); Experiment save(); void delete(); Experiment allocate(String treatmentName, int size); Experiment deallocate(String treatmentName, int size); Experiment reallocate(String sourceTreatmentName, String destinationTreatmentName, int size); Experiment deallocateAll(); Treatment getTreatment(Identity identity, AttributesMap attributes); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }