@Test public void testBucket() { Calendar c = Calendar.getInstance(); c.setTime(new Date()); Experiment experiment = Experiment.withID(Experiment.ID.newInstance()).withApplicationName(testApp) .withLabel(Experiment.Label.valueOf("exp2")).withStartTime(c.getTime()).withSamplingPercent(1.0).build(); Bucket a = Bucket.newInstance(experiment.getID(), Bucket.Label.valueOf("green")).withAllocationPercent(1.0).withPayload(null).build(); assertEquals(a.getLabel().toString(), "green"); assertEquals(a.getExperimentID(), experiment.getID()); assertEquals(a.getAllocationPercent(), 1.0, EPS); assertEquals(a.getPayload(), null); }
public Bucket() { super(); }
Bucket implements Serializable { public Bucket() { super(); } }
Bucket implements Serializable { public Bucket() { super(); } Bucket(); }
Bucket implements Serializable { public Bucket() { super(); } Bucket(); static Builder newInstance(Experiment.ID experimentID, Bucket.Label label); static Builder from(Bucket bucket); Experiment.ID getExperimentID(); void setExperimentID(Experiment.ID value); Bucket.Label getLabel(); void setLabel(Bucket.Label value); @JsonIgnore Boolean isControl(); @JsonIgnore void setControl(Boolean value); Double getAllocationPercent(); void setAllocationPercent(Double value); String getDescription(); void setDescription(String value); State getState(); void setState(State state); String getPayload(); void setPayload(String value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isStateTransitionValid(State desiredState); }
Bucket implements Serializable { public Bucket() { super(); } Bucket(); static Builder newInstance(Experiment.ID experimentID, Bucket.Label label); static Builder from(Bucket bucket); Experiment.ID getExperimentID(); void setExperimentID(Experiment.ID value); Bucket.Label getLabel(); void setLabel(Bucket.Label value); @JsonIgnore Boolean isControl(); @JsonIgnore void setControl(Boolean value); Double getAllocationPercent(); void setAllocationPercent(Double value); String getDescription(); void setDescription(String value); State getState(); void setState(State state); String getPayload(); void setPayload(String value); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isStateTransitionValid(State desiredState);  }