Entry { public boolean pathEquals(String path) { return Paths.equals(getPath(), path); } Entry(int id, String name);  Entry(Stream s); void write(Stream s); int getId(); IdPath getIdPath(); String getName(); String getPath(); boolean nameEquals(String name); boolean pathEquals(String path); long getTimestamp(); boolean isReadOnly(); void setReadOnly(boolean isReadOnly); boolean isOutdated(long timestamp); Content getContent(); boolean hasUnavailableContent(); boolean hasUnavailableContent(List<Entry> entriesWithUnavailableContent); Entry getParent(); boolean isDirectory(); void addChild(Entry child); void removeChild(Entry child); List<Entry> getChildren(); Entry findChild(String name); boolean hasEntry(String path); Entry getEntry(String path); Entry findEntry(String path); Entry findEntry(IdPath p); Entry getEntry(IdPath p); Entry getEntry(int id); abstract Entry copy(); void changeName(String newName); void changeContent(Content newContent, long timestamp); List<Difference> getDifferencesWith(Entry e); abstract void collectDifferencesWith(Entry e, List<Difference> result); @Override String toString();  }
@Test public void testPathEquality() { Entry e = new MyEntry() { @Override public String getPath() { return "path"; } }; assertTrue(e.pathEquals("path")); assertFalse(e.pathEquals("bla-bla-bla")); Paths.setCaseSensitive(true); assertFalse(e.pathEquals("PATH")); Paths.setCaseSensitive(false); assertTrue(e.pathEquals("PATH")); }