@Test
public void testDeRegisterPercentOfInstances() throws Throwable {

	int percentage = 50;
    PowerMockito.when(loadBalancerRaider.getInServiceInstances("elb")).thenReturn(Arrays.asList("id-123", "id-456"));
    PowerMockito.when(ec2Raider.getEC2InstancesByIds(Mockito.any())).thenReturn(createInstances());
    loadBalancerStepDefinitions.givenLoadBalancerName("ELB", "elb");
    loadBalancerStepDefinitions.deRegisterPercentOfInstances(percentage);
    Assert.assertTrue(executionStateCache.getDeregistedInstance().size() == Math.round((percentage * executionStateCache.getInstances().size())/100));
}