### Question:
AwsEC2Container extends AwsContainer { @ChaosExperiment(experimentType = ExperimentType.STATE) public void restartContainer (Experiment experiment) { final Instant hardRebootTimer = Instant.now().plus(Duration.ofMinutes(AWS_EC2_HARD_REBOOT_TIMER_MINUTES)); awsEC2Platform.restartInstance(instanceId); experiment.setSelfHealingMethod(autoscalingSelfHealingWrapper(startContainerMethod)); experiment.setCheckContainerHealth(autoscalingHealthcheckWrapper(() -> hardRebootTimer.isBefore(Instant.now()) ? awsEC2Platform .checkHealth(instanceId) : ContainerHealth.RUNNING_EXPERIMENT)); } private  AwsEC2Container(); static AwsEC2ContainerBuilder builder(); String getInstanceId(); String getGroupIdentifier(); String getKeyName(); String getName(); boolean isSSHCapable(); String getImageId(); @Override Platform getPlatform(); @Override boolean eligibleForExperiments(); @Override String getSimpleName(); @Override String getAggregationIdentifier(); @Override DataDogIdentifier getDataDogIdentifier(); @Override boolean isCattle(); @Override boolean supportsShellBasedExperiments(); @ChaosExperiment(experimentType = ExperimentType.STATE) void stopContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE) void restartContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.STATE, experimentScope = ExperimentScope.CATTLE) void terminateASGContainer(Experiment experiment); @ChaosExperiment(experimentType = ExperimentType.NETWORK) void removeSecurityGroups(Experiment experiment); String getRoutableAddress(); String getPublicAddress();  }### Answer:
@Test public void restartContainer () throws Exception { awsEC2Container.restartContainer(experiment); verify(experiment, times(1)).setCheckContainerHealth(ArgumentMatchers.any()); verify(experiment, times(1)).setSelfHealingMethod(ArgumentMatchers.any()); verify(awsEC2Platform, times(1)).restartInstance(INSTANCE_ID); verify(awsEC2Platform, times(0)).startInstance(INSTANCE_ID); experiment.getSelfHealingMethod().run(); verify(awsEC2Platform, times(1)).startInstance(INSTANCE_ID); await().atMost(4, TimeUnit.MINUTES).until(() -> ContainerHealth.RUNNING_EXPERIMENT == experiment.getCheckContainerHealth().call()); experiment.getCheckContainerHealth().call(); }