test_class.declarator: tfWorkingPath = Paths.get(System.getProperty("user.dir"), ".tfproject")
test_class.original_string: Path tfWorkingPath = Paths.get(System.getProperty("user.dir"), ".tfproject");
test_class.type: Path
test_class.var_name: tfWorkingPath
test_class.file: tf-build-tools/tf-maven-plugin/src/test/java/com/deliveredtechnologies/maven/terraform/TerraformGetMavenRootArtifactTest.java
test_class.identifier: TerraformGetMavenRootArtifactTest
test_case.body: @Test
    public void expandMavenArtifactsExpandsTheMavenZipArtifactInTheWorkingDir() throws IOException, TerraformException {
      String artifact = "groupId:artifactId:0.1";
      Path mainTfPath = tfWorkingPath.resolve("src").resolve("main").resolve("tf");
  
      Log log = Mockito.mock(Log.class);
  
      if (!mainTfPath.toFile().exists()) forceMkdir(mainTfPath.toFile());
      copyURLToFile(this.getClass().getResource("/zips/tf-module-my-module1-0.12-rc.zip"), mainTfPath.resolve("artifactId-0.1.zip").toFile());
  
      TerraformGetMavenRootArtifact terraformGetMavenRootArtifact = new TerraformGetMavenRootArtifact(artifact, log);
      terraformGetMavenRootArtifact.expandMavenArtifacts();
      Assert.assertTrue(mainTfPath.resolve("artifactId").toFile().exists());
      Assert.assertEquals(mainTfPath.resolve("artifactId").toFile().listFiles().length, 2);
    }
test_case.class_method_signature: TerraformGetMavenRootArtifactTest.expandMavenArtifactsExpandsTheMavenZipArtifactInTheWorkingDir()
test_case.full_signature: @Test public void expandMavenArtifactsExpandsTheMavenZipArtifactInTheWorkingDir()
test_case.identifier: expandMavenArtifactsExpandsTheMavenZipArtifactInTheWorkingDir
test_case.invocations: resolve resolve resolve mock exists toFile forceMkdir toFile copyURLToFile getResource getClass toFile resolve expandMavenArtifacts assertTrue exists toFile resolve assertEquals listFiles toFile resolve
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void expandMavenArtifactsExpandsTheMavenZipArtifactInTheWorkingDir()
focal_class.declarator: workingPath = Paths.get(System.getProperty("user.dir"), ".tfproject")
focal_class.modifier: private
focal_class.original_string: private Path workingPath = Paths.get(System.getProperty("user.dir"), ".tfproject");
focal_class.type: Path
focal_class.var_name: workingPath
focal_class.declarator: mainTfPath
focal_class.modifier: private
focal_class.original_string: private Path mainTfPath;
focal_class.type: Path
focal_class.var_name: mainTfPath
focal_class.declarator: tfRootDir
focal_class.modifier: private
focal_class.original_string: private String tfRootDir;
focal_class.type: String
focal_class.var_name: tfRootDir
focal_class.declarator: artifact
focal_class.modifier: private
focal_class.original_string: private String artifact;
focal_class.type: String
focal_class.var_name: artifact
focal_class.declarator: log
focal_class.modifier: private
focal_class.original_string: private Log log;
focal_class.type: Log
focal_class.var_name: log
focal_class.file: tf-build-tools/tf-maven-plugin/src/main/java/com/deliveredtechnologies/maven/terraform/TerraformGetMavenRootArtifact.java
focal_class.identifier: TerraformGetMavenRootArtifact
focal_class.interfaces: implements TerraformOperation<String>
focal_class.class_method_signature: TerraformGetMavenRootArtifact.TerraformGetMavenRootArtifact(String artifact, Log log)
focal_class.full_signature: public  TerraformGetMavenRootArtifact(String artifact, Log log)
focal_class.identifier: TerraformGetMavenRootArtifact
focal_class.modifiers: public
focal_class.parameters: (String artifact, Log log)
focal_class.signature:  TerraformGetMavenRootArtifact(String artifact, Log log)
focal_class.class_method_signature: TerraformGetMavenRootArtifact.TerraformGetMavenRootArtifact(String artifact, String tfRootDir, Log log)
focal_class.full_signature: public  TerraformGetMavenRootArtifact(String artifact, String tfRootDir, Log log)
focal_class.identifier: TerraformGetMavenRootArtifact
focal_class.modifiers: public
focal_class.parameters: (String artifact, String tfRootDir, Log log)
focal_class.signature:  TerraformGetMavenRootArtifact(String artifact, String tfRootDir, Log log)
focal_class.class_method_signature: TerraformGetMavenRootArtifact.execute(Properties properties)
focal_class.full_signature: @Override public String execute(Properties properties)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (Properties properties)
focal_class.return: String
focal_class.signature: String execute(Properties properties)
focal_class.class_method_signature: TerraformGetMavenRootArtifact.getArtifactFromMavenRepo(Invoker invoker, InvocationRequest request)
focal_class.full_signature: final void getArtifactFromMavenRepo(Invoker invoker, InvocationRequest request)
focal_class.identifier: getArtifactFromMavenRepo
focal_class.modifiers: final
focal_class.parameters: (Invoker invoker, InvocationRequest request)
focal_class.return: void
focal_class.signature: void getArtifactFromMavenRepo(Invoker invoker, InvocationRequest request)
focal_class.class_method_signature: TerraformGetMavenRootArtifact.expandMavenArtifacts()
focal_class.full_signature: final Path expandMavenArtifacts()
focal_class.identifier: expandMavenArtifacts
focal_class.modifiers: final
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path expandMavenArtifacts()
focal_class.class_method_signature: TerraformGetMavenRootArtifact.getArtifactZip(String artifact)
focal_class.full_signature: static String getArtifactZip(String artifact)
focal_class.identifier: getArtifactZip
focal_class.modifiers: static
focal_class.parameters: (String artifact)
focal_class.return: String
focal_class.signature: String getArtifactZip(String artifact)
focal_method.body: final Path expandMavenArtifacts() throws TerraformException {
      String artifactZip = getArtifactZip(this.artifact);
      Path artifactZipPath = mainTfPath.resolve(artifactZip);
  
      log.info("Expanding artifacts from " + artifactZipPath.toAbsolutePath());
  
      return (new ExpandableZippedArtifact(artifactZipPath, log)).expand()
        .orElseThrow(() -> new TerraformException("unable to extract " + artifactZipPath.getFileName()));
    }
focal_method.class_method_signature: TerraformGetMavenRootArtifact.expandMavenArtifacts()
focal_method.full_signature: final Path expandMavenArtifacts()
focal_method.identifier: expandMavenArtifacts
focal_method.invocations: getArtifactZip resolve info toAbsolutePath orElseThrow expand getFileName
focal_method.modifiers: final
focal_method.parameters: ()
focal_method.return: Path
focal_method.signature: Path expandMavenArtifacts()