class RDSRaiderImpl implements RDSRaider {

    @Override
    public List<DBInstance> getInstanceIdsForAvailabilityZone(String availabilityZone, List<String> dbInstanceIdsToIgnore) {
        if (dbInstanceIdsToIgnore == null) throw new InvalidInputDataException("dbInstanceIdsToIgnore can not be null");

        //not using filters because they seem to cause errors : name = db-instance-id, and value = empty array list
        List<DBInstance> dbInstances = rdsDelegator.getAmazonRds().describeDBInstances(new DescribeDBInstancesRequest()).getDBInstances();

        for (Iterator<DBInstance> it = dbInstances.iterator(); it.hasNext(); ) {
            DBInstance dbInstance = it.next();

            if (!dbInstance.getAvailabilityZone().contains(availabilityZone)) {
                it.remove();
            }
            if (dbInstanceIdsToIgnore.contains(dbInstance.getDBInstanceIdentifier())) {
                it.remove();
            }
        }

        return dbInstances;
    }

    public  RDSRaiderImpl();

}