@Test
    public void require_that_struct_fields_are_overwritten() {
        String name1 = "foo";
        String gender1 = "MALE";
        String[] emails1 = {"foo@bar", "bar@foo"};
        String name2 = "bar";
        String gender2 = "FEMALE";
        String[] emails2 = {"foo@bar", "bar@foo"};
        StructtypesConfig.Builder b1 = createSimpleStructBuilder(name1, gender1, emails1);
        StructtypesConfig.Builder b2 = createSimpleStructBuilder(name2, gender2, emails2);
        ConfigInstanceUtil.setValues(b1, b2);
        StructtypesConfig c1 = new StructtypesConfig(b1);
        assertThat(c1.simple().name(),  is(name2));
        assertThat(c1.simple().gender().toString(),  is(gender2));
        assertThat(c1.simple().emails(0), is(emails2[0]));
        assertThat(c1.simple().emails(1), is(emails2[1]));
    }
SEO keywords: test override() on builders. overrideTest, testOverride

@author Ulf Lilleengen
config/src/test/java/com/yahoo/vespa/config/ConfigBuilderMergeTest.java