class AwsEC2Platform extends Platform implements SshBasedExperiment<AwsEC2Container> {

    public boolean isAutoscalingGroupAtDesiredInstances (String autoScalingGroupName) {
        List<AutoScalingGroup> autoScalingGroups = amazonAutoScaling.describeAutoScalingGroups(new DescribeAutoScalingGroupsRequest()
                .withAutoScalingGroupNames(autoScalingGroupName)).getAutoScalingGroups();
        int desiredCapacity = autoScalingGroups.stream().findFirst().map(AutoScalingGroup::getDesiredCapacity).orElse(1);
        int actualCapacity = (int) autoScalingGroups.stream()
                                                    .map(AutoScalingGroup::getInstances)
                                                    .flatMap(Collection::stream)
                                                    .filter(instance -> instance.getHealthStatus().equals("Healthy"))
                                                    .count();
        return desiredCapacity == actualCapacity;
    }

    @Autowired  AwsEC2Platform(AmazonEC2 amazonEC2, ContainerManager containerManager, AwsEC2SelfAwareness awsEC2SelfAwareness);
    private  AwsEC2Platform();

}