### Question:
GithubCommentManager { public int deleteComment(Predicate<Comment> commentPredicate) throws IOException { List<Comment> comments = issueService.getComments(repoId, issueNumber); int delCount = 0; for (Comment c : comments) { if (logger.isDebugEnabled()) { logger.debug("pre filtered comment {} : {}/{}", c.getUser().getLogin(), c.getId(), c.getBody()); } if (!commentPredicate.test(c)) { continue; } logger.debug("delete comment {} {}", repoId, c.getId()); issueService.deleteComment(repoId, c.getId()); delCount++; } logger.debug("delete {} comments", delCount); return delCount; } GithubCommentManager(IssueService issueService, RepositoryId repo, int issueNumber); int deleteComment(Predicate<Comment> commentPredicate); void addComment(String comment);  }### Answer:
@Test public void deleteComment() throws IOException { when(mockIssue.getComments(repositoryId, prNum)) .thenReturn(Collections.singletonList(new Comment().setId(1).setBody("test") .setUser(new User().setId(1)))); doNothing().when(mockIssue) .deleteComment(repositoryId, 1); GithubCommentManager manager = new GithubCommentManager(mockIssue, repositoryId, prNum); assertEquals(1, manager.deleteComment(c -> c.getBody().equals("test"))); }