class CloudFoundryApplication extends Container {

    @ChaosExperiment(experimentType = ExperimentType.RESOURCE)
    public void scaleApplication (Experiment experiment) {
        experiment.setSelfHealingMethod(rescaleApplicationToDefault);
        experiment.setCheckContainerHealth(isAppHealthy);
        experiment.setFinalizeMethod(rescaleApplicationToDefault);
        int newScale;
        do {
            newScale = RANDOM.nextInt(MAX_INSTANCES - MIN_INSTANCES) + MIN_INSTANCES;
        } while (newScale == actualContainerInstances);
        actualContainerInstances = newScale;
        log.debug("Scaling {} to {} instances", name, actualContainerInstances);
        cloudFoundryApplicationPlatform.rescaleApplication(name, actualContainerInstances);
    }

    public  CloudFoundryApplication();

}