### Question:
PointAccessor implements PropertyAccessor<Point> { @Override public Point fromBytes(Class targetClass, byte[] b) { ObjectInputStream ois; Point o; try { ois = new ObjectInputStream(new ByteArrayInputStream(b)); o = (Point) ois.readObject(); ois.close(); } catch (IOException e) { log.error("IO exception, Caused by {}.", e); throw new PropertyAccessException(e); } catch (ClassNotFoundException e) { log.error("Class not found exception, Caused by {}.", e); throw new PropertyAccessException(e); } return o; }  @Override Point fromBytes(Class targetClass, byte[] b); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Point fromString(Class targetClass, String s); @Override Point getCopy(Object object); @Override Object getInstance(Class<?> clazz); static Logger log; }### Answer:
@Test public void testFromBytes() { Point point = new Point(4.5, 6.3); byte[] input = pa.toBytes(point); Point point2 = pa.fromBytes(Point.class, input); Assert.assertTrue(point.equals(point2)); }