@Test
public void time() {

  when(nullRef.type()).thenReturn(TIME);
  when(missingRef.type()).thenReturn(TIME);
  assertEquals(nullValue(), eval(dsl.time(nullRef)));
  assertEquals(missingValue(), eval(dsl.time(missingRef)));
  FunctionExpression expr = dsl.time(DSL.literal("01:01:01"));
  assertEquals(TIME, expr.type());
  assertEquals(new ExprTimeValue("01:01:01"), eval(expr));
  assertEquals("time(\"01:01:01\")", expr.toString());
  expr = dsl.time(DSL.literal(new ExprTimeValue("01:01:01")));
  assertEquals(TIME, expr.type());
  assertEquals(new ExprTimeValue("01:01:01"), eval(expr));
  assertEquals("time(TIME '01:01:01')", expr.toString());
}