@Override
    public String getResourceId() {
        return relativePath;
    }
@Test
    public void testRelativization() throws Exception {
        //test assertion error if alleged child is not actually child
        Path root = Paths
                .get("root/abc/def")
                .toAbsolutePath();
        Path allegedChild = Paths.get(root
                .getParent()
                .getParent()
                .toAbsolutePath()
                .toString());
        try {
            FSFileResource r = new FSFileResource(root, allegedChild);
            fail("should have had assertion error: alleged child not actually child of root");
        } catch (AssertionError e) {
            //swallow
        }

        //test regular workings
        root = Paths.get("root/abc/def");
        Path child = Paths.get(root.toString(), "ghi/jkl/lmnop.doc");
        FSFileResource r = new FSFileResource(root, child);
        String id = r.getResourceId();
        assertTrue(id.startsWith("ghi"));
        assertTrue(id.endsWith("lmnop.doc"));
    }