class InstanceFailureStepDefinitions implements EC2StepFunctions {

    @When("^terminate process  \"([^\"]*)\" on (\\d+) instance in zone \"([^\"]*)\"$")
    public InstanceFailureStepDefinitions terminateProcessInAvailabilityZone(String processName, int numHosts, String zoneId) {
        List<EC2InstanceTO> instancesTO = ec2Raider.getEc2InstancesForAvailabilityZone(zoneId, new ArrayList<>());

        if (instancesTO == null || instancesTO.isEmpty()) {
            throw new RuntimeException("No Instances are available");
        }

        executionStateCache.addProcessName(processName);

        if (numHosts > instancesTO.size()) {
            numHosts = instancesTO.size();
        }

        terminateProcess(processName, numHosts, instancesTO);

        return this;
    }

    public  InstanceFailureStepDefinitions();

}