code: Entity applyMappingToEntity(
        EntityMapping sourceMapping, Entity sourceEntity, EntityType targetMetaData, int depth) {
      Entity target = entityManager.create(targetMetaData, POPULATE);
  
      if (targetMetaData.getAttribute(SOURCE) != null) {
        target.set(SOURCE, sourceMapping.getName());
      }
  
      sourceMapping
          .getAttributeMappings()
          .forEach(
              attributeMapping ->
                  applyMappingToAttribute(
                      attributeMapping,
                      sourceEntity,
                      target,
                      sourceMapping.getSourceEntityType(),
                      depth));
      return target;
    }
docs: Package-private for testablility