DateConverter implements Converter<Date> { @Override public Date fromString(String string) { if (string.length() == 0) { return null; } try { return format.parse(string); } catch (ParseException e) { throw new ConverterException(resId); } } DateConverter(Context context, int resId);  DateConverter(DateFormat format, int resId); @Override String toString(Date value); @Override Date fromString(String string); static DateConverter getTimeConverter(Context context, int resId); static DateConverter getTimestampConverter(int resId); static DateConverter getDateConverter(Context context, int resId); static DateConverter getMediumDateConverter(Context context,
			int resId); static DateConverter getLongDateConverter(Context context, int resId);  }
@Test public void testToProperty() throws Exception { DateConverter converter = new DateConverter(new SimpleDateFormat( "dd.MM.yyyy"), 0); assertEquals(new Date(100, 0, 1), converter.fromString("01.01.2000")); assertEquals(null, converter.fromString("")); }