GitBlameCommand extends Command { public List<GitBlameWithUsage> getGitBlameWithUsagesToProcess(List<GitBlameWithUsage> gitBlameWithUsages) { List<GitBlameWithUsage> filteredGitBlameWithUsages = new ArrayList<>(); for (GitBlameWithUsage gitBlameWithUsage : gitBlameWithUsages) { if (gitBlameWithUsage.getGitBlame() == null || OverrideType.ALL.equals(overrideType) || (OverrideType.NO_INFO.equals(overrideType) && gitBlameWithUsage.getGitBlame().getAuthorName() == null)) { logger.debug("Will process text unit name: {}", gitBlameWithUsage.getTextUnitName()); filteredGitBlameWithUsages.add(gitBlameWithUsage); } } return filteredGitBlameWithUsages; }  @Override void execute(); List<GitBlameWithUsage> getGitBlameWithUsagesToProcess(List<GitBlameWithUsage> gitBlameWithUsages);  }
@Test public void getGitBlameWithUsagesToProcess() { GitBlameCommand gitBlameCommand = new GitBlameCommand(); ArrayList<GitBlameWithUsage> gitBlameWithUsages = new ArrayList<>(); GitBlameWithUsage toSkip = new GitBlameWithUsage(); toSkip.setGitBlame(new GitBlame()); gitBlameWithUsages.add(toSkip); gitBlameWithUsages.add(new GitBlameWithUsage()); List<GitBlameWithUsage> gitBlameWithUsagesToProcess = gitBlameCommand.getGitBlameWithUsagesToProcess(gitBlameWithUsages); assertEquals(1, gitBlameWithUsagesToProcess.size()); assertFalse(gitBlameWithUsagesToProcess.contains(toSkip)); }