public String getRelative() {
        if (elements.isEmpty()) {
            return "";
        }
        StringBuilder sb = new StringBuilder();
        sb.append(elements.get(0));
        for (int i = 1; i < elements.size(); i++) {
            sb.append(delimiter);
            sb.append(elements.get(i));
        }
        return sb.toString();
    }
@Test
    public void testGetPath() {
        assertEquals("foo/bar/baz", getAbsolutePath().getRelative());
        assertEquals("foo/bar/baz", getRelativePath().getRelative());
        assertEquals("foo/bar/baz", getWithSlashes().getRelative());
        assertEquals("foo/bar/baz", getAppended().getRelative());
        assertEquals("foo", getOne().getRelative());
    }