@Test
public void testSafeResolution() throws Exception {

    Path cwd = Paths.get(".");
    String windows = "C:/temp/file.txt";
    String linux = "/root/dir/file.txt";
    boolean ex = false;
    try {
        FSUtil.resolveRelative(cwd, windows);
    } catch (IllegalArgumentException e) {
        ex = true;
    }
    try {
        FSUtil.resolveRelative(cwd, linux);
    } catch (IllegalArgumentException e) {
        ex = true;
    }
    assertTrue("IllegalArgumentException should have been thrown", ex);
}