ExperimentCli { static Optional<String> execute(Experiment.Builder builder, String[] args) { return createMenu(builder).execute(args); } private  ExperimentCli(); static Menu createMenu(Experiment.Builder builder); static Menu.Builder createMenuBuilder(Experiment.Builder builder);  }
@Test public void testOrdering() { testFail(menu, "o", CauseType.HANDLER_FAILURE, "-o", "CONFIG,SCENARIO"); testFail(menu, "o", CauseType.HANDLER_FAILURE, "-o", "SEED_REPS,REPS,SCENARIO,CONFIG,SEED_REPS"); assertThat(builder.experimentOrdering) .isEqualTo(Experiment.Builder.DEFAULT_EXPERIMENT_ORDERING); menu.execute("-o", "SEED_REPS,REPS,SCENARIO,CONFIG"); assertThat(builder.experimentOrdering) .containsExactly( SimulationProperty.SEED_REPS, SimulationProperty.REPS, SimulationProperty.SCENARIO, SimulationProperty.CONFIG) .inOrder(); }
@Test public void testWarmup() { assertThat(menu.execute("-w", "123")).isAbsent(); assertThat(builder.warmupPeriodMs).isEqualTo(123); testFail(menu, "w", CauseType.HANDLER_FAILURE, "-w", "-9"); }