ExprIntervalValue extends AbstractExprValue { @Override public ExprType type() { return ExprCoreType.INTERVAL; }  @Override TemporalAmount intervalValue(); @Override int compare(ExprValue other); @Override boolean equal(ExprValue other); @Override TemporalAmount value(); @Override ExprType type(); TemporalUnit unit();  }
@Test public void invalid_get_value() { ExprDateValue value = new ExprDateValue("2020-08-20"); assertThrows(ExpressionEvaluationException.class, value::intervalValue, String.format("invalid to get intervalValue from value of type %s", value.type())); }
@Test public void type() { ExprValue interval = new ExprIntervalValue(Period.ofYears(1)); assertEquals(interval.type(), INTERVAL); }