### Question:
SQLDateAccessor implements PropertyAccessor<Date> { @Override public Date fromString(Class targetClass, String s) { if (s == null) { return null; } if (StringUtils.isNumeric(s)) { return new Date(Long.parseLong(s)); } Date d = Date.valueOf(s); return d; }  @Override Date fromBytes(Class targetClass, byte[] b); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Date fromString(Class targetClass, String s); @Override Date getCopy(Object object); Date getInstance(Class<?> clazz); static Logger log; }### Answer:
@Test public void testFromString() { Assert.assertNull(accessor.fromString(Date.class, null)); long l = System.currentTimeMillis(); Date d = new Date(l); Date d2 = accessor.fromString(Date.class, "" + l); Assert.assertEquals(d, d2); Assert.assertEquals(d.getYear(), accessor.fromString(Date.class, d2.toString()).getYear()); Assert.assertEquals(d.getMonth(), accessor.fromString(Date.class, d2.toString()).getMonth()); Assert.assertEquals(d.getDate(), accessor.fromString(Date.class, d2.toString()).getDate()); }