@Test
public void testGetStackServiceInheritance() {

  StackInfo baseStack = stackManager.getStack("OTHER", "1.0");
  StackInfo stack = stackManager.getStack("OTHER", "2.0");
  assertEquals(5, stack.getServices().size());
  ServiceInfo service = stack.getService("SQOOP2");
  ServiceInfo baseSqoopService = baseStack.getService("SQOOP2");
  assertEquals("SQOOP2", service.getName());
  assertEquals("Inherited from parent", service.getComment());
  assertEquals("Extended from parent version", service.getVersion());
  assertNull(service.getServicePackageFolder());
  // compare components
  List<ComponentInfo> serviceComponents = service.getComponents();
  List<ComponentInfo> baseStormServiceCompoents = baseSqoopService.getComponents();
  assertEquals(serviceComponents, baseStormServiceCompoents);
  // values from base service
  assertEquals(baseSqoopService.isDeleted(), service.isDeleted());
  assertEquals(baseSqoopService.getAlertsFile(),service.getAlertsFile());
  assertEquals(baseSqoopService.getClientComponent(), service.getClientComponent());
  assertEquals(baseSqoopService.getCommandScript(), service.getCommandScript());
  assertEquals(baseSqoopService.getConfigDependencies(), service.getConfigDependencies());
  assertEquals(baseSqoopService.getConfigDir(), service.getConfigDir());
  assertEquals(baseSqoopService.getConfigDependenciesWithComponents(), service.getConfigDependenciesWithComponents());
  assertEquals(baseSqoopService.getConfigTypeAttributes(), service.getConfigTypeAttributes());
  assertEquals(baseSqoopService.getCustomCommands(), service.getCustomCommands());
  assertEquals(baseSqoopService.getExcludedConfigTypes(), service.getExcludedConfigTypes());
  assertEquals(baseSqoopService.getProperties(), service.getProperties());
  assertEquals(baseSqoopService.getMetrics(), service.getMetrics());
  assertNull(baseSqoopService.getMetricsFile());
  assertNull(service.getMetricsFile());
  assertEquals(baseSqoopService.getOsSpecifics(), service.getOsSpecifics());
  assertEquals(baseSqoopService.getRequiredServices(), service.getRequiredServices());
  assertEquals(baseSqoopService.getSchemaVersion(), service.getSchemaVersion());
}