### Question:
DoubleToStringConverterFactory implements TypeConverterFactory<Double, String> { @Override public TypeConverter<Double, String> createTypeConverter() { return new NumberToStringConverter<>(); }  @Override TypeConverter<Double, String> createTypeConverter(); @Override TypeConverterDescriptor<Class<Double>, Class<String>> getTypeConverterDescriptor();  }### Answer:
@Test public void test_encode_format_config() { DoubleToStringConverterFactory doubleToStringConverterFactory = new DoubleToStringConverterFactory(); Properties config = new Properties(); config.setProperty(NumberTypeConverter.FORMAT, "#,###.##"); TypeConverter<Double, String> typeConverter = doubleToStringConverterFactory.createTypeConverter(); ((Configurable) typeConverter).setConfiguration(config); assertEquals("1,234.45", typeConverter.convert(1234.45d)); }
@Test public void test_encode_locale_config() { DoubleToStringConverterFactory doubleToStringConverterFactory = new DoubleToStringConverterFactory(); Properties config = new Properties(); config.setProperty(NumberTypeConverter.LOCALE, "de-DE"); TypeConverter<Double, String> typeConverter = doubleToStringConverterFactory.createTypeConverter(); ((Configurable) typeConverter).setConfiguration(config); assertEquals("1234,45", typeConverter.convert(1234.45d)); }