public static String normalize(final String path) {
        return normalize(path, true);
    }
@Test
    public void testPathName() {
        {
            Path path = new Path(PathNormalizer.normalize(
                    "/path/to/file/"), EnumSet.of(Path.Type.directory));
            assertEquals("file", path.getName());
            assertEquals("/path/to/file", path.getAbsolute());
        }
        {
            Path path = new Path(PathNormalizer.normalize(
                    "/path/to/file"), EnumSet.of(Path.Type.directory));
            assertEquals("file", path.getName());
            assertEquals("/path/to/file", path.getAbsolute());
        }
    }