@Test
public void testDeRegisterInstances() throws Throwable {

    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.deRegisterInstances(1);
    Assert.assertTrue(executionStateCache.getDeregistedInstance().size() == 1);
}