private Map<Object, Object> convertMap(
     Class<?> mapClass,
     Type targetKeyType,
     Type targetValueType,
     Map<?, ?> sourceObject,
     Action<? super SourceObjectMapping> mapping) {
   Map<Object, Object> convertedElements = collectionMapper.createEmptyMap(mapClass);
   for (Map.Entry<?, ?> entry : sourceObject.entrySet()) {
     convertedElements.put(
         convert(targetKeyType, entry.getKey(), mapping),
         convert(targetValueType, entry.getValue(), mapping));
   }
   return convertedElements;
 }