GitBlameCommand extends Command { String getFileName(String usage) { return usage.split(":")[0]; }  @Override void execute(); List<GitBlameWithUsage> getGitBlameWithUsagesToProcess(List<GitBlameWithUsage> gitBlameWithUsages);  }
@Test public void getFileName() { GitBlameCommand gitBlameCommand = new GitBlameCommand(); assertEquals("file.js", gitBlameCommand.getFileName("file.js")); assertEquals("file.js", gitBlameCommand.getFileName("file.js:25")); assertEquals("path/to/file.js", gitBlameCommand.getFileName("path/to/file.js")); assertEquals("path/to/file.js", gitBlameCommand.getFileName("path/to/file.js:25")); }