@Test
public void resolve_value() {

  assertEquals(integerValue(1), DSL.ref("integer_value", INTEGER).valueOf(valueEnv()));
  assertEquals(longValue(1L), DSL.ref("long_value", LONG).valueOf(valueEnv()));
  assertEquals(floatValue(1f), DSL.ref("float_value", FLOAT).valueOf(valueEnv()));
  assertEquals(doubleValue(1d), DSL.ref("double_value", DOUBLE).valueOf(valueEnv()));
  assertEquals(booleanValue(true), DSL.ref("boolean_value", BOOLEAN).valueOf(valueEnv()));
  assertEquals(stringValue("str"), DSL.ref("string_value", STRING).valueOf(valueEnv()));
  assertEquals(tupleValue(ImmutableMap.of("str", 1)),
      DSL.ref("struct_value", STRUCT).valueOf(valueEnv()));
  assertEquals(collectionValue(ImmutableList.of(1)),
      DSL.ref("array_value", ARRAY).valueOf(valueEnv()));
  assertEquals(LITERAL_NULL, DSL.ref(BOOL_TYPE_NULL_VALUE_FIELD, BOOLEAN).valueOf(valueEnv()));
  assertEquals(LITERAL_MISSING,
      DSL.ref(BOOL_TYPE_MISSING_VALUE_FIELD, BOOLEAN).valueOf(valueEnv()));
}