test_class.declarator: availabilityZoneStepDefinitions
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private AvailabilityZoneStepDefinitions availabilityZoneStepDefinitions;
test_class.type: AvailabilityZoneStepDefinitions
test_class.var_name: availabilityZoneStepDefinitions
test_class.declarator: ec2Raider
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private EC2Raider ec2Raider;
test_class.type: EC2Raider
test_class.var_name: ec2Raider
test_class.declarator: executionStateCache
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private ExecutionStateCache executionStateCache;
test_class.type: ExecutionStateCache
test_class.var_name: executionStateCache
test_class.file: cloudraider-core/src/test/java/com/intuit/cloudraider/cucumber/steps/AvailabilityZoneStepDefinitionsTest.java
test_class.identifier: AvailabilityZoneStepDefinitionsTest
test_case.body: @Test
      public void testGivenAzWithIgnoreTags() {
  
          executionStateCache.clearInstances();
          PowerMockito.when(ec2Raider.getInstancesFromAnyTags(Mockito.anyList())).thenReturn(createInstances());
          PowerMockito.when(ec2Raider.getEc2InstancesForAvailabilityZone(Mockito.anyString(), Mockito.anyList())).thenReturn(createInstances());
  
          Assert.assertEquals(0, executionStateCache.getInstances().size());
          availabilityZoneStepDefinitions.givenAzWithIgnoreTags("us-west-2a, us-west-2b", "testkey:testvalue");
  
          Assert.assertTrue(executionStateCache.getInstances().size() > 0);
      }
test_case.class_method_signature: AvailabilityZoneStepDefinitionsTest.testGivenAzWithIgnoreTags()
test_case.full_signature: @Test public void testGivenAzWithIgnoreTags()
test_case.identifier: testGivenAzWithIgnoreTags
test_case.invocations: clearInstances thenReturn when getInstancesFromAnyTags anyList createInstances thenReturn when getEc2InstancesForAvailabilityZone anyString anyList createInstances assertEquals size getInstances givenAzWithIgnoreTags assertTrue size getInstances
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGivenAzWithIgnoreTags()
focal_class.declarator: ec2Raider
focal_class.modifier: @Autowired
      @Qualifier("ec2raiderBean")
      private
focal_class.original_string: @Autowired
      @Qualifier("ec2raiderBean")
      private EC2Raider ec2Raider;
focal_class.type: EC2Raider
focal_class.var_name: ec2Raider
focal_class.declarator: logger = LoggerFactory.getLogger(this.getClass())
focal_class.original_string: Logger logger = LoggerFactory.getLogger(this.getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: executionStateCache
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ExecutionStateCache executionStateCache;
focal_class.type: ExecutionStateCache
focal_class.var_name: executionStateCache
focal_class.file: cloudraider-core/src/main/java/com/intuit/cloudraider/cucumber/steps/AvailabilityZoneStepDefinitions.java
focal_class.identifier: AvailabilityZoneStepDefinitions
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.getExecutionStateCache()
focal_class.full_signature: public ExecutionStateCache getExecutionStateCache()
focal_class.identifier: getExecutionStateCache
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ExecutionStateCache
focal_class.signature: ExecutionStateCache getExecutionStateCache()
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.full_signature: public void setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.identifier: setExecutionStateCache
focal_class.modifiers: public
focal_class.parameters: (ExecutionStateCache executionStateCache)
focal_class.return: void
focal_class.signature: void setExecutionStateCache(ExecutionStateCache executionStateCache)
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.AvailabilityZoneStepDefinitions()
focal_class.full_signature: public  AvailabilityZoneStepDefinitions()
focal_class.identifier: AvailabilityZoneStepDefinitions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  AvailabilityZoneStepDefinitions()
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)
focal_class.full_signature: @Given("^AZs \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public AvailabilityZoneStepDefinitions givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)
focal_class.identifier: givenAzWithIgnoreTags
focal_class.modifiers: @Given("^AZs \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public
focal_class.parameters: (String azs, String instanceIgnoreTags)
focal_class.return: AvailabilityZoneStepDefinitions
focal_class.signature: AvailabilityZoneStepDefinitions givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.givenAzWithCompulsoryTags(String azs, String compulsoryTagsString, String ignoreTagsString)
focal_class.full_signature: @Given("^AZs \"([^\"]*)\" instance only with tags \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public void givenAzWithCompulsoryTags(String azs, String compulsoryTagsString, String ignoreTagsString)
focal_class.identifier: givenAzWithCompulsoryTags
focal_class.modifiers: @Given("^AZs \"([^\"]*)\" instance only with tags \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public
focal_class.parameters: (String azs, String compulsoryTagsString, String ignoreTagsString)
focal_class.return: void
focal_class.signature: void givenAzWithCompulsoryTags(String azs, String compulsoryTagsString, String ignoreTagsString)
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.terminateInstanceOnNumInstances(int numInstances )
focal_class.full_signature: @When("^terminate (\\d+) instance in AZ$") public AvailabilityZoneStepDefinitions terminateInstanceOnNumInstances(int numInstances )
focal_class.identifier: terminateInstanceOnNumInstances
focal_class.modifiers: @When("^terminate (\\d+) instance in AZ$") public
focal_class.parameters: (int numInstances )
focal_class.return: AvailabilityZoneStepDefinitions
focal_class.signature: AvailabilityZoneStepDefinitions terminateInstanceOnNumInstances(int numInstances )
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.terminateInstanceOnNumInstancesWithTags(int numInstances, String compulsoryTagsString)
focal_class.full_signature: @When("^terminate (\\d+) instance in AZ only with tags \\\"([^\\\"]*)\\\"$") public AvailabilityZoneStepDefinitions terminateInstanceOnNumInstancesWithTags(int numInstances, String compulsoryTagsString)
focal_class.identifier: terminateInstanceOnNumInstancesWithTags
focal_class.modifiers: @When("^terminate (\\d+) instance in AZ only with tags \\\"([^\\\"]*)\\\"$") public
focal_class.parameters: (int numInstances, String compulsoryTagsString)
focal_class.return: AvailabilityZoneStepDefinitions
focal_class.signature: AvailabilityZoneStepDefinitions terminateInstanceOnNumInstancesWithTags(int numInstances, String compulsoryTagsString)
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.tagStringToList(String tagString)
focal_class.full_signature:  List<Tag> tagStringToList(String tagString)
focal_class.identifier: tagStringToList
focal_class.parameters: (String tagString)
focal_class.return: List<Tag>
focal_class.signature: List<Tag> tagStringToList(String tagString)
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.confirmHealthyHostCount()
focal_class.full_signature: @Then("^assertEC2 healthy host count in AZ$") public void confirmHealthyHostCount()
focal_class.identifier: confirmHealthyHostCount
focal_class.modifiers: @Then("^assertEC2 healthy host count in AZ$") public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void confirmHealthyHostCount()
focal_class.class_method_signature: AvailabilityZoneStepDefinitions.confirmHealthyHostCount(int expected)
focal_class.full_signature: public boolean confirmHealthyHostCount(int expected)
focal_class.identifier: confirmHealthyHostCount
focal_class.modifiers: public
focal_class.parameters: (int expected)
focal_class.return: boolean
focal_class.signature: boolean confirmHealthyHostCount(int expected)
focal_method.body: @Given("^AZs \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$")
      public AvailabilityZoneStepDefinitions givenAzWithIgnoreTags(String azs, String instanceIgnoreTags) {
          String[] availabilityZones = azs.split(",\\s*");
  
          List<Tag> tags = CucumberHelperFunctions.tagStringToList(instanceIgnoreTags);
  
          List<String> instanceIdsToIgnore =
                  new ArrayList<>(ec2Raider.getInstancesFromAnyTags(tags).stream().map(EC2InstanceTO::getInstanceId).collect(Collectors.toList()));
  
          for (String availabilityZone : availabilityZones) {
              executionStateCache.addInstances(ec2Raider.getEc2InstancesForAvailabilityZone(availabilityZone, instanceIdsToIgnore));
          }
          return this;
      }
focal_method.class_method_signature: AvailabilityZoneStepDefinitions.givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)
focal_method.full_signature: @Given("^AZs \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public AvailabilityZoneStepDefinitions givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)
focal_method.identifier: givenAzWithIgnoreTags
focal_method.invocations: split tagStringToList collect map stream getInstancesFromAnyTags toList addInstances getEc2InstancesForAvailabilityZone
focal_method.modifiers: @Given("^AZs \"([^\"]*)\" ignore instances with tags \"([^\"]*)\"$") public
focal_method.parameters: (String azs, String instanceIgnoreTags)
focal_method.return: AvailabilityZoneStepDefinitions
focal_method.signature: AvailabilityZoneStepDefinitions givenAzWithIgnoreTags(String azs, String instanceIgnoreTags)