DataUtils { public static List<DbDependency> getAllDbDependencies(final DbModule module) { final List<DbDependency> dependencies = new ArrayList<DbDependency>(); dependencies.addAll(module.getDependencies()); for(final DbModule submodule: module.getSubmodules()){ dependencies.addAll(getAllDbDependencies(submodule)); } return dependencies; } private  DataUtils(); static List<String> getAllArtifacts(final DbModule module); static Set<Artifact> getAllArtifacts(final Module module); static Set<Dependency> getAllDependencies(final Module module); static List<DbDependency> getAllDbDependencies(final DbModule module); static String getModuleName(final String moduleId); static String getModuleVersion(final String moduleId); static String getGroupId(final String gavc); static DbArtifact createDbArtifact(final String gavc); static Artifact createArtifact(final String gavc); static List<DbModule> getAllSubmodules(final DbModule module); static boolean isFullGAVC(final String entry); static String strip(final String gavc, final int stripCount); static void sort(final List<Artifact> targets);  }
@Test public void getAllDbDependencies(){ final DbModule module = new DbModule(); module.addDependency("", Scope.TEST); final DbModule submodule1 = new DbModule(); submodule1.addDependency("", Scope.TEST); final DbModule submodule2 = new DbModule(); submodule2.addDependency("", Scope.TEST); submodule1.addSubmodule(submodule2); module.addSubmodule(submodule1); final List<DbDependency> dependencies = DataUtils.getAllDbDependencies(module); assertEquals(3, dependencies.size()); }