class LoadBalancerStepDefinitions {

    public LoadBalancerStepDefinitions deRegisterPercentOfInstances(double percentage) {
        List<EC2InstanceTO> instances = executionStateCache.getInstances();
        int numInstances = (int) Math.round((percentage * instances.size())/100);

        if (instances.isEmpty()) {
            throw new RuntimeException("No Instances are available");
        }

        List<EC2InstanceTO> instanceList = instances;
        if (instanceList.size() != numInstances) {
            instanceList = instances.subList(0,numInstances);
        }

        loadBalancerRaider.deregisterInstancesFromLoadBalancer(executionStateCache.getLoadBalancerName(), Ec2Utils.generateInstanceIdList(instanceList));
        executionStateCache.addDeregisteredInstance(instanceList);

        return this;
    }

    public  LoadBalancerStepDefinitions();

}