@Test
    public void testIntDefaultValues() {
        ConfigDefinition def = new ConfigDefinition("foo", "namespace1");

        def.addIntDef("foo");
        def.addIntDef("bar", 0);
        def.addIntDef("baz", 1);
        def.addIntDef("xyzzy", 2, 0, null);

        assertNull(def.getIntDefs().get("foo").getDefVal());
        assertEquals(ConfigDefinition.INT_MIN, def.getIntDefs().get("foo").getMin());
        assertEquals(ConfigDefinition.INT_MAX, def.getIntDefs().get("foo").getMax());
        assertEquals(0, def.getIntDefs().get("bar").getDefVal().longValue());
        assertEquals(1, def.getIntDefs().get("baz").getDefVal().longValue());

        assertEquals(2, def.getIntDefs().get("xyzzy").getDefVal().longValue());
        assertEquals(0, def.getIntDefs().get("xyzzy").getMin().longValue());
        assertEquals(ConfigDefinition.INT_MAX, def.getIntDefs().get("xyzzy").getMax());
    }
Unit tests for ConfigDefinition.

@author hmusum
config/src/test/java/com/yahoo/vespa/config/ConfigDefinitionTest.java