static double toDouble(final JsonNode object) {
    if (object instanceof NumericNode) {
      return object.doubleValue();
    }
    if (object instanceof TextNode) {
      try {
        return Double.parseDouble(object.textValue());
      } catch (final NumberFormatException e) {
        throw failedStringCoercionException(SqlBaseType.DOUBLE);
      }
    }

    throw invalidConversionException(object, SqlBaseType.DOUBLE);
  }
@Test(expected = IllegalArgumentException.class)
  public void shouldNotConvertIncorrectStringToDouble() {
    JsonSerdeUtils.toDouble(JsonNodeFactory.instance.textNode("1!::"));
  }