### Question:
BigDecimalAccessor implements PropertyAccessor<BigDecimal> { @Override public BigDecimal fromBytes(Class targetClass, byte[] bytes) { if (bytes == null) { return null; } int scale = (((bytes[0]) << 24) | ((bytes[1] & 0xff) << 16) | ((bytes[2] & 0xff) << 8) | ((bytes[3] & 0xff))); byte[] bibytes = Arrays.copyOfRange(bytes, 4, bytes.length); BigInteger bi = new BigInteger(bibytes); return new BigDecimal(bi, scale); }  @Override BigDecimal fromBytes(Class targetClass, byte[] bytes); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override BigDecimal fromString(Class targetClass, String s); @Override BigDecimal getCopy(Object object); BigDecimal getInstance(Class<?> clazz);  }### Answer:
@Test public void testFromBytes() { Assert.assertNull(accessor.fromBytes(BigDecimal.class, null)); BigDecimal v1 = new BigDecimal(1111111111.11111); byte[] b = accessor.toBytes(v1); BigDecimal v2 = accessor.fromBytes(BigDecimal.class, b); Assert.assertEquals(v1, v2); }