### Question:
CodestartCatalogLoader { static String getDirName(Path d) { return d.getFileName().toString().replaceAll("([/\\\\])$", ""); } private  CodestartCatalogLoader(); static CodestartCatalog<CodestartProjectInput> loadDefaultCatalog(CodestartPathLoader pathLoader,
            String first,
            String... more); static Collection<Codestart> loadUserDirectoryCodestarts(Path directory); static List<Codestart> loadCodestarts(CodestartPathLoader pathLoader, String first, String... more);  }### Answer:
@Test void testGetDirName() { assertThat(CodestartCatalogLoader.getDirName(Paths.get("test-codestart/my-codestart/java/"))).isEqualTo("java"); assertThat(CodestartCatalogLoader.getDirName(Paths.get("test-codestart/my-codestart/java"))).isEqualTo("java"); }