### Question:
ShortAccessor implements PropertyAccessor<Short> { @Override public Short fromString(Class targetClass, String s) { try { if (s == null) { return null; } Short sh = new Short(s); return sh; } catch (NumberFormatException e) { log.error("Number format exception, Caused by {}.", e); throw new PropertyAccessException(e); } }  @Override Short fromBytes(Class targetClass, byte[] data); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Short fromString(Class targetClass, String s); @Override Short getCopy(Object object); Short getInstance(Class<?> clazz); static Logger log; }### Answer:
@Test public void testFromString() { Assert.assertNull(accessor.fromString(Short.class, null)); Short d1 = new Short((short)4); String s = d1.toString(); Short d2 = accessor.fromString(Short.class, s); Assert.assertEquals(d1, d2); }