LocalResourceId implements ResourceId { @Override public boolean isDirectory() { return pathString.endsWith(File.separator); } private  LocalResourceId(Path path, boolean isDirectory); @Override LocalResourceId resolve(String other, ResolveOptions resolveOptions); @Override LocalResourceId getCurrentDirectory(); @Override @Nullable String getFilename(); @Override String getScheme(); @Override boolean isDirectory(); @Override String toString(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }
@Test public void testIsDirectory() { assumeFalse(SystemUtils.IS_OS_WINDOWS); assertTrue(toResourceIdentifier("/").isDirectory()); assertTrue(toResourceIdentifier("/root/tmp/").isDirectory()); assertFalse(toResourceIdentifier("/root").isDirectory()); }