static Timestamp toTimestamp(final JsonNode object) {
    if (object instanceof NumericNode) {
      return new Timestamp(object.asLong());
    }
    if (object instanceof TextNode) {
      try {
        return new Timestamp(Long.parseLong(object.textValue()));
      } catch (final NumberFormatException e) {
        throw failedStringCoercionException(SqlBaseType.TIMESTAMP);
      }
    }
    throw invalidConversionException(object, SqlBaseType.TIMESTAMP);
  }
@Test(expected = IllegalArgumentException.class)
  public void shouldFailWhenConvertingIncompatibleTimestamp() {
    JsonSerdeUtils.toTimestamp(JsonNodeFactory.instance.booleanNode(false));
  }