### Question:
SQLTimestampAccessor implements PropertyAccessor<Timestamp> { @Override public Timestamp fromBytes(Class targetClass, byte[] b) { try { if (b == null) { return null; } LongAccessor longAccessor = new LongAccessor(); return new Timestamp(longAccessor.fromBytes(targetClass, b)); } catch (Exception e) { log.error("Error occured, Caused by {}.", e); throw new PropertyAccessException(e); } }  @Override Timestamp fromBytes(Class targetClass, byte[] b); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Timestamp fromString(Class targetClass, String s); @Override Timestamp getCopy(Object object); Timestamp getInstance(Class<?> clazz); static Logger log; }### Answer:
@Test public void testFromBytes() { Assert.assertNull(accessor.fromBytes(Timestamp.class, null)); long l = System.currentTimeMillis(); Timestamp t = new Timestamp(l); byte[] b = accessor.toBytes(t); Timestamp t2 = accessor.fromBytes(Timestamp.class, b); Assert.assertEquals(t, t2); }