@Test
public void timestamp() {

  when(nullRef.type()).thenReturn(TIMESTAMP);
  when(missingRef.type()).thenReturn(TIMESTAMP);
  assertEquals(nullValue(), eval(dsl.timestamp(nullRef)));
  assertEquals(missingValue(), eval(dsl.timestamp(missingRef)));
  FunctionExpression expr = dsl.timestamp(DSL.literal("2020-08-17 01:01:01"));
  assertEquals(TIMESTAMP, expr.type());
  assertEquals(new ExprTimestampValue("2020-08-17 01:01:01"), expr.valueOf(env));
  assertEquals("timestamp(\"2020-08-17 01:01:01\")", expr.toString());
  expr = dsl.timestamp(DSL.literal(new ExprTimestampValue("2020-08-17 01:01:01")));
  assertEquals(TIMESTAMP, expr.type());
  assertEquals(new ExprTimestampValue("2020-08-17 01:01:01"), expr.valueOf(env));
  assertEquals("timestamp(TIMESTAMP '2020-08-17 01:01:01')", expr.toString());
}