@Test
  void parseExceptions() {
    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonBoolean(true)).getNumberValue();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonBoolean(true)).getLongValue();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(BsonNull.VALUE).getNumberValue();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(BsonNull.VALUE).getNumberType();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonInt32(42)).getBooleanValue();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonBoolean(true)).getNumberType();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonDateTime(42)).getBooleanValue();
    });

    Assertions.assertThrows(JsonParseException.class, () -> {
      Parsers.parserAt(new BsonTimestamp(42)).getBooleanValue();
    });
  }
Validate different type conversions like {@code DateTime => Long => String}
criteria/mongo/test/org/immutables/criteria/mongo/bson4jackson/TypeConversionTest.java