### Question:
DateConstant extends DateFunction implements ConstantFunction { @Override public long getDate(Record rec) { return value; } DateConstant(int position, long value); @Override long getDate(Record rec);  }### Answer:
@Test public void testConstant() { DateConstant constant = new DateConstant(0, 123); Assert.assertTrue(constant.isConstant()); Assert.assertEquals(123, constant.getDate(null)); }