@Test
public void testTerminateEc2InstancesByTags() throws Exception{

    TerminateInstancesResult response = PowerMockito.mock(TerminateInstancesResult.class);
    DescribeInstancesResult describeInstancesResult = PowerMockito.mock(DescribeInstancesResult.class);
    PowerMockito.when(ec2Delegator.getEc2().describeInstances(Mockito.anyObject())).thenReturn(describeInstancesResult);
    Reservation reservation = new Reservation();
    ArrayList<Instance> instances = new ArrayList();
    instances.add(instance);
    reservation.setInstances(instances);
    ArrayList<Reservation> reservations = new ArrayList<>();
    reservations.add(reservation);
    PowerMockito.when(ec2Delegator.getEc2().describeInstances(Mockito.anyObject()).getReservations()).thenReturn(reservations);
    PowerMockito.when(ec2Delegator.getEc2().terminateInstances(Mockito.anyObject())).thenReturn(response);
    ec2RaiderImplUnderTest.terminateEc2InstancesByTags("service1", "service2");
}