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