@Test
  public void serviceReposAreProcessedEvenIfNoStackRepo() throws Exception {
    StackModule sm = createStackModule("FooBar",
        "2.4",
        Optional.absent(),
        Lists.newArrayList(repoInfo("bar", "2.0.1", "http://bar.org")));
    Set<String> repoIds = getIds(sm.getModuleInfo().getRepositories());
    assertEquals(ImmutableSet.of("bar:2.0.1"), repoIds);
  }
If more add-on services define the same repo, the duplicate repo definitions should be disregarded.
@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/stack/StackModuleTest.java