test_class.declarator: properties
test_class.modifier: private
test_class.original_string: private Properties properties;
test_class.type: Properties
test_class.var_name: properties
test_class.declarator: executable
test_class.modifier: private
test_class.original_string: private Executable executable;
test_class.type: Executable
test_class.var_name: executable
test_class.declarator: logger
test_class.modifier: private
test_class.original_string: private Logger logger;
test_class.type: Logger
test_class.var_name: logger
test_class.file: tf-build-tools/tf-cmd-api/src/test/java/com/deliveredtechnologies/terraform/TerraformPlanFileUtilsTest.java
test_class.identifier: TerraformPlanFileUtilsTest
test_case.body: @Test
    public void backendS3operationsWhenAllPropertiesSpecified() throws IOException, InterruptedException {
      TerraformPlanFileUtils planFileUtils = new TerraformPlanFileUtils(executable, logger);
  
      String kmsKeyId = "4d6f7e4-b816-42f5-87b2-c5952285e53c";
      String s3BucketKey = "s3://terraform-maven-state/planfiles/test.json";
      properties.put("kmsKeyId", kmsKeyId);
      properties.put("planOutputFile", s3BucketKey);
  
      planFileUtils.executePlanFileOperation(properties);
      Mockito.verify(executable, Mockito.times(1)).execute("aws s3 cp test.json s3://terraform-maven-state/planfiles/test.json --sse aws:kms --sse-kms-key-id 4d6f7e4-b816-42f5-87b2-c5952285e53c");
    }
test_case.class_method_signature: TerraformPlanFileUtilsTest.backendS3operationsWhenAllPropertiesSpecified()
test_case.full_signature: @Test public void backendS3operationsWhenAllPropertiesSpecified()
test_case.identifier: backendS3operationsWhenAllPropertiesSpecified
test_case.invocations: put put executePlanFileOperation execute verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void backendS3operationsWhenAllPropertiesSpecified()
focal_class.declarator: logger
focal_class.modifier: private
focal_class.original_string: private Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: LOGGER = LoggerFactory.getLogger(TerraformUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(TerraformUtils.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: executable
focal_class.modifier: private
focal_class.original_string: private Executable executable;
focal_class.type: Executable
focal_class.var_name: executable
focal_class.file: tf-build-tools/tf-cmd-api/src/main/java/com/deliveredtechnologies/terraform/TerraformPlanFileUtils.java
focal_class.identifier: TerraformPlanFileUtils
focal_class.class_method_signature: TerraformPlanFileUtils.TerraformPlanFileUtils(String tfRootDir, Logger logger)
focal_class.full_signature: public  TerraformPlanFileUtils(String tfRootDir, Logger logger)
focal_class.identifier: TerraformPlanFileUtils
focal_class.modifiers: public
focal_class.parameters: (String tfRootDir, Logger logger)
focal_class.signature:  TerraformPlanFileUtils(String tfRootDir, Logger logger)
focal_class.class_method_signature: TerraformPlanFileUtils.TerraformPlanFileUtils(Executable executable, Logger logger)
focal_class.full_signature: public  TerraformPlanFileUtils(Executable executable, Logger logger)
focal_class.identifier: TerraformPlanFileUtils
focal_class.modifiers: public
focal_class.parameters: (Executable executable, Logger logger)
focal_class.signature:  TerraformPlanFileUtils(Executable executable, Logger logger)
focal_class.class_method_signature: TerraformPlanFileUtils.executePlanFileOperation(Properties properties)
focal_class.full_signature: public String executePlanFileOperation(Properties properties)
focal_class.identifier: executePlanFileOperation
focal_class.modifiers: public
focal_class.parameters: (Properties properties)
focal_class.return: String
focal_class.signature: String executePlanFileOperation(Properties properties)
focal_class.class_method_signature: TerraformPlanFileUtils.backendS3operations(String action, String s3Key, Properties properties )
focal_class.full_signature: protected void backendS3operations(String action, String s3Key, Properties properties )
focal_class.identifier: backendS3operations
focal_class.modifiers: protected
focal_class.parameters: (String action, String s3Key, Properties properties )
focal_class.return: void
focal_class.signature: void backendS3operations(String action, String s3Key, Properties properties )
focal_method.body: public String executePlanFileOperation(Properties properties) throws IOException {
  
      boolean isPlanFile = properties.containsKey("planOutputFile") || properties.containsKey("plan");
  
      if (isPlanFile) {
        String planFile = properties.getProperty("planOutputFile") == null ? properties.getProperty("plan") : properties.getProperty("planOutputFile");
        String planFileName = planFile.split("/")[planFile.split("/").length - 1];
  
        String backendAction = properties.getProperty("planOutputFile") == null ? "GET" : "PUT";
  
        if (!planFile.equals(planFileName)) {
          String backendType = planFile.split(":")[0].toLowerCase();
          switch (backendType) {
            case "s3":
              backendS3operations(backendAction, planFile, properties);
              break;
            default:
              break;
          }
        }
      }
      return null;
    }
focal_method.class_method_signature: TerraformPlanFileUtils.executePlanFileOperation(Properties properties)
focal_method.full_signature: public String executePlanFileOperation(Properties properties)
focal_method.identifier: executePlanFileOperation
focal_method.invocations: containsKey containsKey getProperty getProperty getProperty split split getProperty equals toLowerCase split backendS3operations
focal_method.modifiers: public
focal_method.parameters: (Properties properties)
focal_method.return: String
focal_method.signature: String executePlanFileOperation(Properties properties)