@Test public void testPrefetchCallsSixpackPrefetch() { String name = "test-experiment"; Alternative test = new Alternative("test"); Experiment experiment = new ExperimentBuilder(mockSixpack) .withName(name) .withAlternatives(test) .build(); experiment.prefetch(); verify(mockSixpack).prefetch(experiment); }
public PrefetchedExperiment prefetch() { return sixpack.prefetch(this); }
Experiment { public PrefetchedExperiment prefetch() { return sixpack.prefetch(this); } }
Experiment { public PrefetchedExperiment prefetch() { return sixpack.prefetch(this); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); }
Experiment { public PrefetchedExperiment prefetch() { return sixpack.prefetch(this); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); ParticipatingExperiment participate(); PrefetchedExperiment prefetch(); boolean hasForcedChoice(); @Override String toString(); Alternative getControlAlternative(); }
Experiment { public PrefetchedExperiment prefetch() { return sixpack.prefetch(this); } Experiment(Sixpack sixpack, String name, Set<Alternative> alternatives, Alternative forcedChoice, Double trafficFraction); ParticipatingExperiment participate(); PrefetchedExperiment prefetch(); boolean hasForcedChoice(); @Override String toString(); Alternative getControlAlternative(); final Sixpack sixpack; final String name; final Set<Alternative> alternatives; final Alternative forcedChoice; final Double trafficFraction; }