private static void compare(String string) throws IOException {
    JsonElement bson = TypeAdapters.JSON_ELEMENT.read(new BsonReader(new JsonReader(string))); // compare as BSON
    JsonElement gson = TypeAdapters.JSON_ELEMENT.fromJson(string); // compare as JSON
    check(bson).is(gson); // compare the two
  }
Tests direct bson and gson mappings
mongo/test/org/immutables/mongo/bson4gson/BsonReaderTest.java