BenchmarkRunner { public void run(int numRuns) { checkArgument(numRuns > 0, "Must run the pipeline at least once"); this.isBenchmarking.set(true); this.runsRemaining.set(numRuns); eventBus.post(BenchmarkEvent.started()); eventBus.post(new StartSingleBenchmarkRunEvent()); } @Inject  BenchmarkRunner(EventBus eventBus); void run(int numRuns); boolean isRunning(); int getRunsRemaining();  }
@Test(expected = IllegalArgumentException.class) public void testNegativeRuns() { benchmarkRunner.run(-1); }
@Test(expected = IllegalArgumentException.class) public void testZeroRuns() { benchmarkRunner.run(0); }