class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable {

  private void mergeServiceProperties(List<ServicePropertyInfo> other) {
    if (!other.isEmpty()) {
      List<ServicePropertyInfo> servicePropertyList = serviceInfo.getServicePropertyList();
      List<ServicePropertyInfo> servicePropertiesToAdd = Lists.newArrayList();

      Set<String> servicePropertyNames = Sets.newTreeSet(
        Iterables.transform(servicePropertyList, new Function<ServicePropertyInfo, String>() {
          @Nullable
          @Override
          public String apply(ServicePropertyInfo serviceProperty) {
            return serviceProperty.getName();
          }
        })
      );

      for (ServicePropertyInfo otherServiceProperty : other) {
        if (!servicePropertyNames.contains(otherServiceProperty.getName()))
          servicePropertiesToAdd.add(otherServiceProperty);
      }

      List<ServicePropertyInfo> mergedServicePropertyList =
        ImmutableList.<ServicePropertyInfo>builder()
          .addAll(servicePropertyList)
          .addAll(servicePropertiesToAdd)
          .build();

      serviceInfo.setServicePropertyList(mergedServicePropertyList);

      validateServiceInfo();
    }
  }

  public  ServiceModule(StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory);
  public  ServiceModule(
      StackContext stackContext, ServiceInfo serviceInfo, ServiceDirectory serviceDirectory, boolean isCommonService);

}