public static void assertVariableAccessValues(FunctionTestConfig config, String configId) {
        assertTrue(config.bool_with_def());
        assertEquals(5, config.int_val());
        assertEquals(-14, config.int_with_def());
        assertEquals(12345678901L, config.long_val());
        assertEquals(-9876543210L, config.long_with_def());
        assertEquals(41.23, config.double_val(), 0.000001);
        assertEquals(-12, config.double_with_def(), 0.000001);
        assertEquals("foo", config.string_val());
        assertEquals("bar and foo", config.stringwithdef());
        assertEquals(FunctionTestConfig.Enum_val.FOOBAR, config.enum_val());
        assertEquals(FunctionTestConfig.Enumwithdef.BAR2, config.enumwithdef());
        assertEquals(configId, config.refval());
        assertEquals(configId, config.refwithdef());
        assertEquals("etc", config.fileVal().value());
        assertEquals(1, config.boolarr().size());
        assertEquals(1, config.boolarr().size());  // new api with accessor for a List of the original Java type
        assertEquals(false, config.boolarr().get(0));  // new List api
        assertFalse(config.boolarr(0));        // short-hand
        assertEquals(0, config.intarr().size());
        assertEquals(2, config.longarr().size());
        assertEquals(Long.MAX_VALUE, config.longarr(0));
        assertEquals(Long.MIN_VALUE, config.longarr().get(1).longValue());
        assertEquals(2, config.doublearr().size());
        assertEquals(1, config.stringarr().size());
        assertEquals(1, config.enumarr().size());
        assertEquals(FunctionTestConfig.Enumarr.VALUES, config.enumarr().get(0));  // new List api, don't have to call value()
        assertEquals(3, config.refarr().size());
        assertEquals(1, config.fileArr().size());
        assertEquals(configId, config.refarr(0));
        assertEquals(":parent", config.refarr(1));
        assertEquals("parent:", config.refarr(2));
        assertEquals("bin", config.fileArr(0).value());
        assertEquals("function-test.def", config.pathVal().toFile().getName());
        assertEquals("function-test.def", config.optionalPathVal().get().toFile().getName());  // TODO
        assertEquals("pom.xml", config.pathArr(0).toString());
        assertEquals("pom.xml", config.pathMap("one").toString());

        assertEquals("basicFoo", config.basicStruct().foo());
        assertEquals(3, config.basicStruct().bar());  // new List api
        assertEquals(2, config.basicStruct().intArr().size());
        assertEquals(310, config.basicStruct().intArr().get(0).intValue());  // new List api
        assertEquals(311, config.basicStruct().intArr().get(1).intValue());  // new List api
        assertEquals(310, config.basicStruct().intArr(0));          // short-hand
        assertEquals("inner0", config.rootStruct().inner0().name());  // new List api
        assertEquals(11, config.rootStruct().inner0().index());
        assertEquals("inner1", config.rootStruct().inner1().name());
        assertEquals(12, config.rootStruct().inner1().index());
        assertEquals(2, config.rootStruct().innerArr().size());
        assertTrue(config.rootStruct().innerArr(0).boolVal());
        assertEquals("deep", config.rootStruct().innerArr(0).stringVal());
        assertFalse(config.rootStruct().innerArr(1).boolVal());
        assertEquals("blue a=\"escaped\"", config.rootStruct().innerArr(1).stringVal());

        assertEquals(2, config.myarray().size());  // new List api
        assertEquals(configId, config.myarray().get(0).refval());    // new List api
        assertEquals(configId, config.myarray(0).refval());          // short-hand
        assertEquals("file0", config.myarray(0).fileVal().value());
        assertEquals(1, config.myarray(0).myStruct().a());
        assertEquals(2, config.myarray(0).myStruct().b());
        assertEquals(configId, config.myarray(1).refval());
        assertEquals("file1", config.myarray(1).fileVal().value());
        assertEquals(-1, config.myarray(1).myStruct().a());
        assertEquals(-2, config.myarray(1).myStruct().b());
    }
Test most data types and features of the config client API,
e.g. parameter access, missing default values, and more.
<p/>
NOTE: this test does NOT test null default values.

@author gjoranv
config/src/test/java/com/yahoo/config/subscription/FunctionTest.java