@Test
  public void timestamp() throws IOException {
    final long epoch = System.currentTimeMillis();
    BsonTimestamp value = new BsonTimestamp(epoch);
    check(Jsons.readerAt(value).peek()).is(JsonToken.NUMBER);
    check(Jsons.readerAt(value).nextInt()).is((int) epoch);
    check(Jsons.readerAt(value).nextLong()).is(epoch);
    check(Jsons.readerAt(value).nextDouble()).is((double) epoch);
  }
Validate type conversion between BSON and gson-JSON ({@link com.google.gson.stream.JsonToken}).
mongo/test/org/immutables/mongo/bson4gson/TypeConversionTest.java