@Test
  void timestamp() throws IOException {
    final long epoch = System.currentTimeMillis();
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getIntValue()).is((int) epoch);
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getLongValue()).is(epoch);
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getDoubleValue()).is((double) epoch);
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getDecimalValue()).is(BigDecimal.valueOf(epoch));
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getBigIntegerValue()).is(BigInteger.valueOf(epoch));
    check(Parsers.parserAt(new BsonTimestamp(epoch)).getText()).is(Long.toString(epoch));
  }
Validate different type conversions like {@code DateTime => Long => String}
criteria/mongo/test/org/immutables/criteria/mongo/bson4jackson/TypeConversionTest.java