@Test
  public void int32() throws IOException {
    BsonInt32 value = new BsonInt32(42);
    check(Jsons.readerAt(value).peek()).is(JsonToken.NUMBER);
    check(Jsons.readerAt(value).nextInt()).is(42);
    check(Jsons.readerAt(value).nextLong()).is(42L);
    check(Jsons.readerAt(value).nextDouble()).is(42D);
    check(Jsons.readerAt(value).nextString()).is("42");
  }
Validate type conversion between BSON and gson-JSON ({@link com.google.gson.stream.JsonToken}).
mongo/test/org/immutables/mongo/bson4gson/TypeConversionTest.java