### Question:
FileInfo implements Comparable<FileInfo> { @Override public int compareTo(FileInfo o) { return this.getPath().compareTo(o.getPath()); } FileInfo(Path path, boolean isFolder);  FileInfo(Path path, boolean isFolder, String contentHash);  FileInfo(FileComponent component);  FileInfo(FileNode node);  FileInfo(IFileEvent fileEvent);  FileInfo(PathItem pathItem); Path getPath(); String getContentHash(); void setContentHash(String contentHash); boolean isFile(); boolean isFolder(); @Override int compareTo(FileInfo o);  }### Answer:
@Test public void testCompareTo() { Path a = Paths.get("/path/to/a"); FileInfo aInfo = new FileInfo(a, false); Path b = Paths.get("/path/to/b"); FileInfo bInfo = new FileInfo(b, false); assertEquals(-1, aInfo.compareTo(bInfo)); assertEquals(0, aInfo.compareTo(aInfo)); assertEquals(0, bInfo.compareTo(bInfo)); assertEquals(1, bInfo.compareTo(aInfo)); }