public String getName() {
        final String path = uri.getPath();
        final int slash = path.lastIndexOf(SEPARATOR);
        return path.substring(slash + 1);
    }
@Test
    void testGetName() {

        Path p = new Path("/my/fancy/path");
        assertThat(p.getName()).isEqualTo("path");

        p = new Path("/my/fancy/path/");
        assertThat(p.getName()).isEqualTo("path");

        p = new Path("hdfs:///my/path");
        assertThat(p.getName()).isEqualTo("path");

        p = new Path("hdfs:///myPath/");
        assertThat(p.getName()).isEqualTo("myPath");

        p = new Path("/");
        assertThat(p.getName()).isEmpty();

        p = new Path("C:/my/windows/path");
        assertThat(p.getName()).isEqualTo("path");

        p = new Path("file:/C:/my/windows/path");
        assertThat(p.getName()).isEqualTo("path");
    }