### Question:
UUIDAccessor implements PropertyAccessor<UUID> { @Override public UUID fromBytes(Class targetClass, byte[] bytes) throws PropertyAccessException { try { if (bytes == null) { return null; } long msb = 0; long lsb = 0; for (int i = 0; i < 8; i++) msb = (msb << 8) | (bytes[i] & 0xff); for (int i = 8; i < 16; i++) lsb = (lsb << 8) | (bytes[i] & 0xff); return new UUID(msb, lsb); } 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 testFromBytes() { Assert.assertNull(accessor.fromBytes(UUID.class, null)); UUID uuid = UUID.randomUUID(); byte[] b = accessor.toBytes(uuid); UUID uuid2 = accessor.fromBytes(UUID.class, b); Assert.assertEquals(uuid, uuid2); }