    @Test
    public void append() {

        assertEquals(new Path("/").append(new Path("foo")), new Path("/foo"));
        assertEquals(new Path("/").append(new Path("foo/bar")), new Path("/foo/bar"));
        assertEquals(new Path("/foo").append(new Path("bar")), new Path("/foo/bar"));
        assertEquals(new Path("/foo").append(new Path("../bar")), new Path("/bar"));
        assertEquals(new Path("/foo").append(new Path("../../bar")), new Path("/bar"));
        assertEquals(new Path("foo").append(new Path("bar")), new Path("foo/bar"));
        assertEquals(new Path("foo").append(new Path("../bar")), new Path("bar"));
        assertEquals(new Path("foo").append(new Path("../../bar")), new Path("../bar"));

        try {
            new Path("/foo").append(new Path("/"));
            fail();
        } catch (IllegalArgumentException e) {
        }
    }