void () { assertEquals("file", Paths.relativeIfUnder("dir/file", "dir")); assertNull(Paths.relativeIfUnder("dir/file", "abc")); assertNull(Paths.relativeIfUnder("dir/file", "di")); assertNull("dir/file", Paths.relativeIfUnder("/dir/file", "/")); assertEquals("file", Paths.relativeIfUnder("/dir/file", "/dir")); Paths.setCaseSensitive(true); assertNull(Paths.relativeIfUnder("dir/file", "DiR")); Paths.setCaseSensitive(false); assertEquals("file", Paths.relativeIfUnder("dir/file", "DiR")); }