class CloudFoundryContainerPlatform extends CloudFoundryPlatform implements SshBasedExperiment<CloudFoundryContainer> {

    @Override
    public boolean isContainerRecycled (Container container) {
        log.debug("Recycling container {}", v(DataDogConstants.DATADOG_CONTAINER_KEY, container));
        if (!(container instanceof CloudFoundryContainer)) {
            log.warn("Was passed another Platform's container");
            return false;
        }
        CloudFoundryContainer cloudFoundryContainer = (CloudFoundryContainer) container;
        Instant timeInState = getTimeInState(cloudFoundryContainer);
        ContainerHealth containerHealth = checkHealth(cloudFoundryContainer.getApplicationId(), cloudFoundryContainer.getInstance());
        Instant experimentStartTime = cloudFoundryContainer.getExperimentStartTime();
        boolean isContainerRecycled = timeInState != null && timeInState.isAfter(experimentStartTime) && ContainerHealth.NORMAL
                .equals(containerHealth);
        log.debug("Evaluating if the container is recycled. {} {} {}", kv("Container Health", containerHealth), kv("Container Start Time", timeInState), kv("Experiment Start Time", experimentStartTime));
        return isContainerRecycled;
    }

    @Autowired public  CloudFoundryContainerPlatform();

}