class AvailabilityZoneStepDefinitions {

    @Given("^AZs \"([^\"]*)\" instance only with tags \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$")
    public void givenAzWithCompulsoryTags(String azs, String compulsoryTagsString, String ignoreTagsString) {
        String[] availabilityZones = azs.split(",\\s*");

        List<Tag> compulsoryTags = CucumberHelperFunctions.tagStringToList(compulsoryTagsString);
        List<Tag> ignoreTags = CucumberHelperFunctions.tagStringToList(ignoreTagsString);

        List<EC2InstanceTO> instances = new ArrayList<>();

        for (String availabilityZone : availabilityZones) {
            instances.addAll(ec2Raider.getEc2InstanceIdsWithCompulsoryTagsForAvailabilityZone(availabilityZone, ignoreTags, compulsoryTags));
        }

        if (instances.isEmpty()) {
            throw new RuntimeException("No instances available");
        }
        executionStateCache.setInstances(instances);
    }

    public  AvailabilityZoneStepDefinitions();

}