class StackScalabilityCondition {

    boolean isScalable(Stack stack, String instanceGroupName) {
        InstanceGroup instanceGroup = getInstanceGroupByName(stack, instanceGroupName);
        List<InstanceStatus> statuses = getStatuses(instanceGroup);
        return statuses.stream().noneMatch(status -> status.equals(InstanceStatus.REQUESTED));

    }

}