### Question:
ConfigOptions { @Nonnull public List<ConfigValue> asConfigValues( @Nonnull Map<String,String> validConfig ) { Map<String,Setting<?>> settings = settingGroup.settings( validConfig ).stream() .collect( Collectors.toMap( Setting::name, s -> s ) ); return settingGroup.values( validConfig ).entrySet().stream() .map( val -> { BaseSetting<?> setting = (BaseSetting) settings.get( val.getKey() ); return new ConfigValue( setting.name(), setting.description(), setting.documentedDefaultValue(), Optional.ofNullable( val.getValue() ), setting.valueDescription(), setting.internal(), setting.dynamic(), setting.deprecated(), setting.replacement(), setting.secret() ); } ) .collect( Collectors.toList() ); } ConfigOptions( @Nonnull SettingGroup<?> settingGroup ); @Nonnull SettingGroup<?> settingGroup(); @Nonnull List<ConfigValue> asConfigValues( @Nonnull Map<String,String> validConfig );  }### Answer:
@Test void asConfigValue() { List<ConfigValue> values = configOptions.asConfigValues( Collections.singletonMap( "myInt", "123" ) ); assertEquals( 1, values.size() ); assertEquals( Optional.of( 123 ), values.get( 0 ).value() ); assertEquals( "myInt", values.get( 0 ).name() ); assertEquals( Optional.empty(), values.get( 0 ).description() ); assertEquals( "a special test integer", values.get( 0 ).valueDescription() ); }