@Test public void inBackoffPeriodFromStartup () { assertFalse("Without any changes should not be in backoff at startup", experimentManager.inBackoffPeriod()); }
boolean inBackoffPeriod () { return Optional.ofNullable(lastExperimentComplete) .map(instant -> instant.plus(experimentBackoffPeriod)) .map(instant -> instant.isAfter(Instant.now())) .orElse(false); }
ExperimentManager { boolean inBackoffPeriod () { return Optional.ofNullable(lastExperimentComplete) .map(instant -> instant.plus(experimentBackoffPeriod)) .map(instant -> instant.isAfter(Instant.now())) .orElse(false); } }
ExperimentManager { boolean inBackoffPeriod () { return Optional.ofNullable(lastExperimentComplete) .map(instant -> instant.plus(experimentBackoffPeriod)) .map(instant -> instant.isAfter(Instant.now())) .orElse(false); }  }
ExperimentManager { boolean inBackoffPeriod () { return Optional.ofNullable(lastExperimentComplete) .map(instant -> instant.plus(experimentBackoffPeriod)) .map(instant -> instant.isAfter(Instant.now())) .orElse(false); }  void setExperimentBackoffPeriod(Duration experimentBackoffPeriod); boolean areExperimentsInProgress(); }
ExperimentManager { boolean inBackoffPeriod () { return Optional.ofNullable(lastExperimentComplete) .map(instant -> instant.plus(experimentBackoffPeriod)) .map(instant -> instant.isAfter(Instant.now())) .orElse(false); }  void setExperimentBackoffPeriod(Duration experimentBackoffPeriod); boolean areExperimentsInProgress();  }