### Question:
UUIDAccessor implements PropertyAccessor<UUID> { @Override public byte[] toBytes(Object object) throws PropertyAccessException { try { if (object == null) { return null; } UUID uuid = (UUID) object; return asByteArray(uuid); } catch (Exception e) { log.error("Error occured, Caused by {}.", e); throw new PropertyAccessException(e); } }  @Override UUID fromBytes(Class targetClass, byte[] bytes); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override UUID fromString(Class targetClass, String s); @Override UUID getCopy(Object object); UUID getInstance(Class<?> clazz); static Logger log; }### Answer:
@Test public void testToBytes() { Assert.assertNull(accessor.toBytes(null)); UUID uuid = UUID.randomUUID(); byte[] b = accessor.toBytes(uuid); UUID uuid2 = accessor.fromBytes(UUID.class, b); Assert.assertEquals(uuid, uuid2); }