### Question:
BooleanAccessor implements PropertyAccessor<Boolean> { @Override public Boolean fromBytes(Class targetClass, byte[] data) { return (data == null || data.length == 0) ? false : data[0] != 0x00; }  @Override Boolean fromBytes(Class targetClass, byte[] data); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Boolean fromString(Class targetClass, String s); @Override Boolean getCopy(Object object); Boolean getInstance(Class<?> clazz);  }### Answer:
@Test public void testFromBytes() { Assert.assertFalse(accessor.fromBytes(Boolean.class, null)); byte[] b = accessor.toBytes(new Boolean(true)); Boolean bb = accessor.fromBytes(Boolean.class, b); Assert.assertEquals(true, bb.booleanValue()); }