public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) {
        return ConfigInstanceUtil.getNewInstance(clazz, configId, this);
    }
@Test
    public void test_simple_struct() {
        Slime slime = new Slime();
        addStructFields(slime.setObject().setObject("simple"), "foobar", "MALE", new String[] { "foo@bar", "bar@foo" });
        StructtypesConfig config = new ConfigPayload(slime).toInstance(StructtypesConfig.class, "");

        assertThat(config.simple().name(), is("foobar"));
        assertThat(config.simple().gender(), is(StructtypesConfig.Simple.Gender.Enum.MALE));
        assertThat(config.simple().emails(0), is("foo@bar"));
        assertThat(config.simple().emails(1), is("bar@foo"));
    }