@Test
public void testDuplicateComponents() throws IOException {

  SliderFileSystem sfs = ServiceTestUtils.initMockFs();
  String compName = "comp1";
  Service app = createValidApplication(compName);
  app.addComponent(createValidComponent(compName));
  // duplicate component name fails
  try {
    ServiceApiUtil.validateAndResolveService(app, sfs, CONF_DNS_ENABLED);
    Assert.fail(EXCEPTION_PREFIX + "service with component collision");
  } catch (IllegalArgumentException e) {
    assertEquals("Component name collision: " + compName, e.getMessage());
  }
}