### Question:
CharAccessor implements PropertyAccessor<Character> { @Override public Character fromString(Class targetClass, String s) { try { if (s == null) { log.error("Can't convert String " + s + " to character"); throw new PropertyAccessException("Can't convert String " + s + " to character"); } Character c = null; if (s.length() == 1) { c = s.charAt(0); } else { c = Character.MIN_VALUE; } return c; } catch (NumberFormatException e) { log.error("Number format exception caught,Caused by {}.", e); throw new PropertyAccessException(e); } }  @Override Character fromBytes(Class targetClass, byte[] data); @Override byte[] toBytes(Object object); @Override String toString(Object object); @Override Character fromString(Class targetClass, String s); @Override Character getCopy(Object object); Character getInstance(Class<?> clazz);  }### Answer:
@Test public void testFromString() { String a = "A"; char c = accessor.fromString(Character.class, a); Assert.assertEquals('A',c); }