@Test
public void testMergeServicePropertiesInheritFromParent() throws Exception {

  // Given
  ServiceInfo serviceInfo = new ServiceInfo();
  ServiceInfo parentServiceInfo = new ServiceInfo();
  ServicePropertyInfo p1 = new ServicePropertyInfo();
  p1.setName("P1");
  p1.setValue("V1");
  ServicePropertyInfo p2 = new ServicePropertyInfo();
  p2.setName("P2");
  p2.setValue("V2");
  List<ServicePropertyInfo> parentServicePropertyList = Lists.newArrayList(p1, p2);
  parentServiceInfo.setServicePropertyList(parentServicePropertyList);
  // When
  ServiceModule serviceModule = resolveService(serviceInfo, parentServiceInfo);
  // Then
  Map<String, String> parentServiceProperties =  ImmutableMap.<String, String>builder()
    .put("P1", "V1")
    .put("P2", "V2")
    .put(ServiceInfo.DEFAULT_SERVICE_INSTALLABLE_PROPERTY)
    .put(ServiceInfo.DEFAULT_SERVICE_MANAGED_PROPERTY)
    .put(ServiceInfo.DEFAULT_SERVICE_MONITORED_PROPERTY)
    .build();
  assertEquals(parentServicePropertyList, serviceModule.getModuleInfo().getServicePropertyList());
  assertEquals(parentServiceProperties, serviceModule.getModuleInfo().getServiceProperties());
}