### Question:
ByteAccessor implements PropertyAccessor<Byte> { @Override public Byte fromString(Class targetClass, String s) { try { if (s == null) { return null; } Byte b = new Byte(s); return b; } catch (NumberFormatException e) { log.error("Number fromat exception, Caused by {}.", e); throw new PropertyAccessException(e); } }  @Override Byte fromBytes(Class targetClass, byte[] b); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Byte fromString(Class targetClass, String s); @Override Byte getCopy(Object object); Byte getInstance(Class<?> clazz);  }### Answer:
@Test public void testFromString() { Assert.assertNull(accessor.fromString(Byte.class, null)); Byte v1 = new Byte("7"); Byte v2 = accessor.fromString(Byte.class, "7"); Assert.assertEquals(v1, v2); }