@Test (expected = AmazonEC2Exception.class)
public void testTerminateEc2InstancesByInvalidId() throws Exception{

    TerminateInstancesResult response = PowerMockito.mock(TerminateInstancesResult.class);
    TerminateInstancesRequest request = new TerminateInstancesRequest().withInstanceIds("i-999");
    PowerMockito.when(ec2Delegator.getEc2().terminateInstances(request)).thenThrow(new AmazonEC2Exception("The instance ID 'i-999' does not exist"));
    ec2RaiderImplUnderTest.terminateEc2InstancesById("i-999");
}