void () { Entry dir = new DirectoryEntry("dir"); dir.addChild(new FileEntry("child", null, -1, false)); Paths.setCaseSensitive(true); try { dir.addChild(new FileEntry("CHILD", null, -1, false)); } catch (RuntimeException e) { fail(); } try { dir.addChild(new FileEntry("child", null, -1, false)); fail(); } catch (RuntimeException e) { assertEquals("entry 'child' already exists in 'dir'", e.getMessage()); } Paths.setCaseSensitive(false); try { dir.addChild(new FileEntry("CHILD", null, -1, false)); fail(); } catch (RuntimeException e) { } }