### Question:
Experiment { Duration getTimeInState () { return Duration.between(transitionTime, Instant.now()); } Experiment(Container container); String getExperimentMethodName(); Container getContainer(); void setPreferredExperiment(String preferredExperiment); Instant getLastSelfHealingTime(); @JsonIgnore Platform getExperimentLayer(); String getExperimentLayerName(); @JsonIgnore ExperimentMethod getExperimentMethod(); Runnable getSelfHealingMethod(); void setSelfHealingMethod(Runnable selfHealingMethod); @JsonIgnore Runnable getFinalizeMethod(); void setFinalizeMethod(Runnable finalizeMethod); @JsonIgnore Callable<ContainerHealth> getCheckContainerHealth(); void setCheckContainerHealth(Callable<ContainerHealth> checkContainerHealth); void setFinalizationDuration(Duration finalizationDuration); String getId(); ExperimentType getExperimentType(); AtomicInteger getSelfHealingCounter(); ExperimentState getExperimentState(); Instant getStartTime(); void setMinimumDuration(Duration minimumDuration); void setMaximumDuration(Duration maximumDuration); Boolean getWasSelfHealingRequired(); @Override String toString();  }### Answer:
@Test public void getTimeInState () { experiment.setExperimentState(CREATED); experiment.setExperimentState(STARTING); assertTrue(experiment.getTimeInState().getSeconds() < 1); await().atLeast(500, TimeUnit.MILLISECONDS).atMost(1, TimeUnit.SECONDS).until(() -> experiment.getTimeInState().getNano() > 500000000); }