test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/subcommands/impl/ChildTest.java
test_class.identifier: ChildTest
test_case.body: @Test(dataProvider = "inputMap")
      public void checkPullRequestMade(Map<String, Object> inputMap) throws Exception {
          Child child = new Child();
          Namespace ns = new Namespace(inputMap);
          DockerfileGitHubUtil dockerfileGitHubUtil = mock(DockerfileGitHubUtil.class);
          Mockito.when(dockerfileGitHubUtil.getRepo(Mockito.any())).thenReturn(new GHRepository());
          Mockito.when(dockerfileGitHubUtil.getOrCreateFork(Mockito.any())).thenReturn(new GHRepository());
          doNothing().when(dockerfileGitHubUtil).modifyAllOnGithub(Mockito.any(), Mockito.any(), Mockito.any(), Mockito.any());
          GitHubJsonStore gitHubJsonStore = mock(GitHubJsonStore.class);
          when(dockerfileGitHubUtil.getGitHubJsonStore(anyString())).thenReturn(gitHubJsonStore);
          doNothing().when(dockerfileGitHubUtil).createPullReq(Mockito.any(), anyString(), Mockito.any(), any());
  
          child.execute(ns, dockerfileGitHubUtil);
  
          Mockito.verify(dockerfileGitHubUtil, atLeastOnce())
                  .createPullReq(Mockito.any(), anyString(), Mockito.any(), any());
      }
test_case.class_method_signature: ChildTest.checkPullRequestMade(Map<String, Object> inputMap)
test_case.full_signature: @Test(dataProvider = "inputMap") public void checkPullRequestMade(Map<String, Object> inputMap)
test_case.identifier: checkPullRequestMade
test_case.invocations: mock thenReturn when getRepo any thenReturn when getOrCreateFork any modifyAllOnGithub when doNothing any any any any mock thenReturn when getGitHubJsonStore anyString createPullReq when doNothing any anyString any any execute createPullReq verify atLeastOnce any anyString any any
test_case.modifiers: @Test(dataProvider = "inputMap") public
test_case.parameters: (Map<String, Object> inputMap)
test_case.return: void
test_case.signature: void checkPullRequestMade(Map<String, Object> inputMap)
focal_class.declarator: log = LoggerFactory.getLogger(Child.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(Child.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/subcommands/impl/Child.java
focal_class.identifier: Child
focal_class.interfaces: implements ExecutableWithNamespace
focal_class.class_method_signature: Child.execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.full_signature: @Override public void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_class.return: void
focal_class.signature: void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_method.body: @Override
      public void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
              throws IOException, InterruptedException {
          String branch = ns.get(Constants.GIT_BRANCH);
          String img = ns.get(Constants.IMG);
          String forceTag = ns.get(Constants.FORCE_TAG);
  
          /* Updates store if a store is specified. */
          dockerfileGitHubUtil.getGitHubJsonStore(ns.get(Constants.STORE)).updateStore(img, forceTag);
  
          log.info("Retrieving repository and creating fork...");
          GHRepository repo = dockerfileGitHubUtil.getRepo(ns.get(Constants.GIT_REPO));
          GHRepository fork = dockerfileGitHubUtil.getOrCreateFork(repo);
          if (fork == null) {
              log.info("Unable to fork {}. Please make sure that the repo is forkable.",
                      repo.getFullName());
              return;
          }
  
          GitForkBranch gitForkBranch = new GitForkBranch(img, forceTag, branch);
          PullRequestInfo pullRequestInfo =
                  new PullRequestInfo(ns.get(Constants.GIT_PR_TITLE),
                          gitForkBranch.getImageName(),
                          gitForkBranch.getImageTag());
  
          dockerfileGitHubUtil.createOrUpdateForkBranchToParentDefault(repo, fork, gitForkBranch);
  
          log.info("Modifying on Github...");
          dockerfileGitHubUtil.modifyAllOnGithub(fork, gitForkBranch.getBranchName(), img, forceTag);
          dockerfileGitHubUtil.createPullReq(repo,
                  gitForkBranch.getBranchName(),
                  fork,
                  pullRequestInfo);
      }
focal_method.class_method_signature: Child.execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_method.full_signature: @Override public void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_method.identifier: execute
focal_method.invocations: get get get updateStore getGitHubJsonStore get info getRepo get getOrCreateFork info getFullName get getImageName getImageTag createOrUpdateForkBranchToParentDefault info modifyAllOnGithub getBranchName createPullReq getBranchName
focal_method.modifiers: @Override public
focal_method.parameters: (final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)
focal_method.return: void
focal_method.signature: void execute(final Namespace ns, final DockerfileGitHubUtil dockerfileGitHubUtil)