protected void initializeNewMapping(
      Mapping newMapping, Collection<?> inputs, Collection<?> outputs) {
    @SuppressWarnings("unchecked")
    Collection<EObject> eObjectInputs = (Collection<EObject>) inputs;
    @SuppressWarnings("unchecked")
    Collection<EObject> eObjectOutputs = (Collection<EObject>) outputs;
    newMapping.getInputs().addAll(eObjectInputs);
    newMapping.getOutputs().addAll(eObjectOutputs);

    if (getTypeMappingRoot() != null) {
      Collection<?> inputTypes = getTypeClassifiers(inputs);
      if (!inputTypes.isEmpty()) {
        Collection<?> outputTypes = getTypeClassifiers(outputs);

        Collection<?> typeMappings = getTypeMappings(inputTypes, outputTypes);
        if (!typeMappings.isEmpty()) {
          newMapping.setTypeMapping((Mapping) typeMappings.iterator().next());
        }
      }
    }
  }