@Test
public void testCreatePullReq_Delete() throws Exception {

    gitHubUtil = mock(GitHubUtil.class);
    GHRepository forkRepo = mock(GHRepository.class);
    GHPullRequestQueryBuilder prBuilder = mock(GHPullRequestQueryBuilder.class);
    when(prBuilder.state(GHIssueState.OPEN)).thenReturn(prBuilder);
    PagedIterable<GHPullRequest> iteratable = mock(PagedIterable.class);
    when(prBuilder.list()).thenReturn(iteratable);
    PagedIterator<GHPullRequest> iterator = mock(PagedIterator.class);
    when(iterator.hasNext()).thenReturn(false);
    when(iteratable.iterator()).thenReturn(iterator);
    when(forkRepo.queryPullRequests()).thenReturn(prBuilder);
    when(gitHubUtil.createPullReq(any(), anyString(), any(), anyString(), eq(Constants.PULL_REQ_ID))).thenReturn(1);
    doCallRealMethod().when(gitHubUtil).safeDeleteRepo(forkRepo);
    dockerfileGitHubUtil = new DockerfileGitHubUtil(gitHubUtil);
    PullRequestInfo pullRequestInfo = new PullRequestInfo(null, null, null);
    dockerfileGitHubUtil.createPullReq(new GHRepository(), "branch", forkRepo, pullRequestInfo);
    verify(gitHubUtil, times(1)).createPullReq(any(), anyString(), any(), anyString(), eq(Constants.PULL_REQ_ID));
    verify(forkRepo, times(1)).delete();
}