@Test public void duplicateStackServiceReposAreDiscarded() throws Exception { StackModule sm = createStackModule("FooBar", "2.4", Optional.of(Lists.newArrayList(repoInfo("StackRepoA", "1.1.1", "http: repoInfo("StackRepoB", "2.2.2", "http: Lists.newArrayList(repoInfo("serviceRepoA", "1.0.0", "http: Lists.newArrayList(repoInfo("serviceRepoA", "1.0.0", "http: Lists.newArrayList(repoInfo("serviceRepoB", "1.2.1", "http: Lists.newArrayList(repoInfo("serviceRepoB", "1.2.3", "http: Lists.newArrayList(repoInfo("StackRepoA", "2.0.0", "http: repoInfo("ShouldBeJustAWarning1", "3.1.1", "http: repoInfo("ShouldBeJustAWarning2", "1.0.0", "http: List<RepositoryInfo> repos = sm.getModuleInfo().getRepositories(); Set<String> repoIds = getIds(repos); assertEquals("Unexpected number of repos. Each repo should be added only once", repoIds.size(), repos.size()); assertEquals("Unexpected repositories", ImmutableSet.of("StackRepoA:1.1.1", "StackRepoB:2.2.2", "serviceRepoA:1.0.0", "ShouldBeJustAWarning1:3.1.1", "ShouldBeJustAWarning2:1.0.0"), repoIds); }
@Override public StackInfo getModuleInfo() { return stackInfo; }
StackModule extends BaseModule<StackModule, StackInfo> implements Validable { @Override public StackInfo getModuleInfo() { return stackInfo; } }
StackModule extends BaseModule<StackModule, StackInfo> implements Validable { @Override public StackInfo getModuleInfo() { return stackInfo; } StackModule(StackDirectory stackDirectory, StackContext stackContext); }
StackModule extends BaseModule<StackModule, StackInfo> implements Validable { @Override public StackInfo getModuleInfo() { return stackInfo; } StackModule(StackDirectory stackDirectory, StackContext stackContext); Map<String, ServiceModule> getServiceModules(); Map<String, ExtensionModule> getExtensionModules(); @Override void resolve(
      StackModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override StackInfo getModuleInfo(); @Override boolean isDeleted(); @Override String getId(); @Override void finalizeModule(); StackDirectory getStackDirectory(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); @Override void addErrors(Collection<String> errors); }
StackModule extends BaseModule<StackModule, StackInfo> implements Validable { @Override public StackInfo getModuleInfo() { return stackInfo; } StackModule(StackDirectory stackDirectory, StackContext stackContext); Map<String, ServiceModule> getServiceModules(); Map<String, ExtensionModule> getExtensionModules(); @Override void resolve(
      StackModule parentModule, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override StackInfo getModuleInfo(); @Override boolean isDeleted(); @Override String getId(); @Override void finalizeModule(); StackDirectory getStackDirectory(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); @Override void addErrors(Collection<String> errors);  }