public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) {
        return ConfigInstanceUtil.getNewInstance(clazz, configId, this);
    }
@Test
    public void non_existent_struct_in_array_of_struct_in_payload_is_ignored() {
        Slime slime = new Slime();
        Cursor nestedArrEntry = slime.setObject().setArray("nestedarr").addObject();
        addStructFields(nestedArrEntry.setObject("inner"), "existing", "MALE", null);
        addStructFields(nestedArrEntry.setObject("non_existent"), "non-existent", "MALE", null);

        StructtypesConfig config =  new ConfigPayload(slime).toInstance(StructtypesConfig.class, "");
        assertThat(config.nestedarr(0).inner().name(), is("existing"));
    }