static Time toTime(final JsonNode object) {
    if (object instanceof NumericNode) {
      return returnTimeOrThrow(object.asLong());
    }
    if (object instanceof TextNode) {
      try {
        return returnTimeOrThrow(Long.parseLong(object.textValue()));
      } catch (final NumberFormatException e) {
        throw failedStringCoercionException(SqlBaseType.TIME);
      }
    }
    throw invalidConversionException(object, SqlBaseType.TIME);
  }
@Test
  public void shouldNotConvertOverflowStringToTime() {
    try {
      JsonSerdeUtils.toTime(JsonNodeFactory.instance.textNode("3000000000"));
    } catch (Exception e) {
      assertThat(e.getMessage(), equalTo("Time values must use number of milliseconds greater than 0 and less than 86400000."));
    }
  }