### Question:
ExperimentManager { public boolean areExperimentsInProgress () { return !getAllExperiments().isEmpty(); }  void setExperimentBackoffPeriod(Duration experimentBackoffPeriod); boolean areExperimentsInProgress();  }### Answer:
@Test public void areExperimentsInProgress () { doReturn(Collections.emptySet()).doReturn(Set.of(mock(Experiment.class))) .when(experimentManager) .getAllExperiments(); assertFalse(experimentManager.areExperimentsInProgress()); assertTrue(experimentManager.areExperimentsInProgress()); }