List<MavenTreeModuleImportData> (MavenModuleImportDataWithDependencies dataWithDependencies) { SplittedMainAndTestModules mainAndTestModules = dataWithDependencies.getModuleImportData().getSplittedMainAndTestModules(); MavenProject project = dataWithDependencies.getModuleImportData().getMavenProject(); ModuleData moduleData = dataWithDependencies.getModuleImportData().getModuleData(); MavenProjectChanges changes = dataWithDependencies.getModuleImportData().getChanges(); if (mainAndTestModules != null) { List<MavenTreeModuleImportData> result = new ArrayList<>(3); result.add(new MavenTreeModuleImportData( project, moduleData, Collections.emptyList(), dataWithDependencies.getModuleImportData().getChanges() )); result.add(new MavenTreeModuleImportData( project, mainAndTestModules.getMainData(), dataWithDependencies.getMainDependencies(), changes )); List<MavenImportDependency<?>> dependencies = concat(dataWithDependencies.getTestDependencies(), dataWithDependencies.getMainDependencies()); result.add(new MavenTreeModuleImportData(project, mainAndTestModules.getTestData(), dependencies, changes )); return result; } return List.of(new MavenTreeModuleImportData( project, moduleData, concat(dataWithDependencies.getMainDependencies(), dataWithDependencies.getTestDependencies()), changes )); }