public static CodecRegistry registryFromMapper(final ObjectMapper mapper) {
    Objects.requireNonNull(mapper, "mapper");
    return CodecRegistries.fromRegistries(new NativeCodecRegistry(mapper), JacksonCodecRegistry.of(mapper));
  }
Create {@link CodecRegistry} adapter on the top of existing mapper instance
criteria/mongo/src/org/immutables/criteria/mongo/bson4jackson/JacksonCodecs.java