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