class EC2RaiderImpl implements EC2Raider {

    @Override
    public List<EC2InstanceTO> getEc2InstancesForAvailabilityZone(String availabilityZone, List<String> instanceIdsToIgnore) {
        if (instanceIdsToIgnore == null) {
            instanceIdsToIgnore = new ArrayList<>();
        }
        List<String> instanceIds = new ArrayList<>();

        for (Reservation reservation : getReservationsByAvailabilityZone(availabilityZone)) {
            for (Instance instance : reservation.getInstances()) {
                if (Ec2Utils.isAwsInfrastructure(instance)
                        || instanceIdsToIgnore.contains(instance.getInstanceId())
                        || instance.getState().getName().equalsIgnoreCase("terminated")) {
                    continue;
                }
                if(instance.getState().getName().equalsIgnoreCase("terminated")) {
                	continue;
                }
                instanceIds.add(instance.getInstanceId());
            }
        }
        return getEC2InstancesByIds(instanceIds);
    }

    public  EC2RaiderImpl();

}