@Override
      public JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) {
        if (IS_BSON_TYPE.test(type)) {
          Codec<?> codec = findCodecOrNull(registry, type.getRawClass());
          return codec == null ? null : serializer(codec);
        }
        return null;
      }
Create {@link CodecRegistry} adapter on the top of existing mapper instance
criteria/mongo/src/org/immutables/criteria/mongo/bson4jackson/JacksonCodecs.java