private static BsonGenerator generatorFor(BsonWriter writer) {
    return new BsonGenerator(0, writer);
  }
Writing null values does not cause an exception
criteria/mongo/test/org/immutables/criteria/mongo/bson4jackson/BsonGeneratorTest.java