    @Test
    public void testToHierarchicalUri() {

        for (final String[] params : new String[][] {
            { "foo:bar:baz:/x/bö%20m?plö%20k!/bä%20g?zö%20k!/", "baz:/x/bö%20m/bä%20g?zö%20k" },
            { "foo:bar:baz:/x/bööm?plönk!/bäng?zönk!/", "baz:/x/bööm/bäng?zönk" },
            { "foo:bar:baz:/boom?plonk!/bang?zonk!/", "baz:/boom/bang?zonk" },
            { "foo:bar:baz:/boom!/bang!/", "baz:/boom/bang" },
            { "foo:bar:/baz?boom!/", "bar:/baz?boom" },
            { "foo:bar:/baz!/", "bar:/baz" },
            { "foo:/bar/", "foo:/bar/" },
        }) {
            final FsMountPoint mp = FsMountPoint.create(URI.create(params[0]));
            final URI hmp = mp.toHierarchicalUri();
            final FsNodePath p = FsNodePath.create(URI.create(params[0]));
            final URI hp = p.toHierarchicalUri();
            assertThat(hmp, equalTo(URI.create(params[1])));
            assertThat(hmp, equalTo(hp));
        }
    }