### Question:
StringToDateConverterFactory implements TypeConverterFactory<String, Date> { @Override public TypeConverter<String, Date> createTypeConverter() { return new StringToDateConverter(); }  @Override TypeConverter<String, Date> createTypeConverter(); @Override TypeConverterDescriptor<Class<String>, Class<Date>> getTypeConverterDescriptor();  }### Answer:
@Test public void test_DateDecoder_01() { StringToDateConverterFactory stringToDateConverterFactory = new StringToDateConverterFactory(); Properties config = new Properties(); config.setProperty(DateToStringLocaleAwareConverter.FORMAT, "EEE MMM dd HH:mm:ss z yyyy"); config.setProperty(DateToStringLocaleAwareConverter.LOCALE_LANGUAGE_CODE, "en"); config.setProperty(DateToStringLocaleAwareConverter.LOCALE_COUNTRY_CODE, "IE"); TypeConverter<String, Date> typeConverter = stringToDateConverterFactory.createTypeConverter(); ((Configurable) typeConverter).setConfiguration(config); Date date_a = typeConverter.convert("Wed Nov 15 13:45:28 EST 2006"); assertEquals(1163616328000L, date_a.getTime()); Date date_b = typeConverter.convert("Wed Nov 15 13:45:28 EST 2006"); assertNotSame(date_a, date_b); }
@Test public void test_DateDecoder_02() { StringToDateConverterFactory stringToDateConverterFactory = new StringToDateConverterFactory(); Properties config = new Properties(); config.setProperty(DateToStringLocaleAwareConverter.FORMAT, "EEE MMM dd HH:mm:ss z yyyy"); config.setProperty(DateToStringLocaleAwareConverter.LOCALE, "en-IE"); TypeConverter<String, Date> typeConverter = stringToDateConverterFactory.createTypeConverter(); ((Configurable) typeConverter).setConfiguration(config); Date date_a = typeConverter.convert("Wed Nov 15 13:45:28 EST 2006"); assertEquals(1163616328000L, date_a.getTime()); Date date_b = typeConverter.convert("Wed Nov 15 13:45:28 EST 2006"); assertNotSame(date_a, date_b); }