AbstractModuleService implements ModuleServiceCore<T>,
                   ModuleFactory<T> { @Override public void createModuleDirectories(final Path repositoryRoot) { final org.uberfire.java.nio.file.Path modulePath = Paths.convert(repositoryRoot); try { ioService.startBatch(modulePath.getFileSystem(), commentedOptionFactory.makeCommentedOption("Adding module directories")); final Path mainResourcesPath = Paths.convert(modulePath.resolve(ModuleResourcePaths.MAIN_RESOURCES_PATH)); final Package defaultPackage = resourceResolver.resolvePackage(mainResourcesPath); final Path pomPath = Paths.convert(modulePath.resolve(POMServiceImpl.POM_XML)); final POM modulePom = pomService.load(pomPath); final String workspacePath = resourceResolver.getDefaultWorkspacePath(modulePom.getGav()); resourceResolver.newPackage(defaultPackage, workspacePath, false); } finally { ioService.endBatch(); } } protected  AbstractModuleService();  AbstractModuleService(final IOService ioService,
                                 final POMService pomService,
                                 final RepositoryService repoService,
                                 final Event<NewModuleEvent> newModuleEvent,
                                 final Event<NewPackageEvent> newPackageEvent,
                                 final Event<InvalidateDMOModuleCacheEvent> invalidateDMOCache,
                                 final SessionInfo sessionInfo,
                                 final CommentedOptionFactory commentedOptionFactory,
                                 final ModuleFinder moduleFinder,
                                 final ResourceResolver resourceResolver); @Override Set<Module> getAllModules(final Branch branch); @Override Package newPackage(final Package parentPackage,
                              final String packageName); @Override Path rename(final Path pathToPomXML,
                       final String newName,
                       final String comment); @Override void delete(final Path pathToPomXML,
                       final String comment); @Override void copy(final Path pathToPomXML,
                     final String newName,
                     final String comment); @Override void reImport(final Path pathToPomXML); @Override void createModuleDirectories(final Path repositoryRoot);  }
@Test public void createModuleDirectoriesTest() { final String workspacePath = "workspacePath"; final Package defaultPackage = mock(Package.class); when(path.toURI()).thenReturn("file: when(pomService.load(any())).thenReturn(mock(POM.class)); when(resourceResolver.getDefaultWorkspacePath(any())).thenReturn(workspacePath); when(resourceResolver.resolvePackage(any())).thenReturn(defaultPackage); abstractProjectService.createModuleDirectories(path); verify(resourceResolver).newPackage(defaultPackage, workspacePath, false); }