CharacterFormatter implements IValueFormatter { @Override public String toString(Object value, Map<String, Object> options) { return value == null ? NullObjectFormatter.NULL_STRING : value.toString(); }  @Override String toString(Object value, Map<String, Object> options); @Override boolean acceptType(Type type, Map<String, Object> options); @Override Value valueOf(String value, Type type, Map<String, Object> options);  }
@Test public void testToString() throws Exception { Map<String, Object> options = formatter.getDefaultOptions(); Value charVar = getVM().mirrorOf('c'); assertEquals("Should be able to format char type.", "c", formatter.toString(charVar, options)); charVar = getVM().mirrorOf('C'); assertEquals("Should be able to format char type.", "C", formatter.toString(charVar, options)); charVar = getVM().mirrorOf('?'); assertEquals("Should be able to format char type.", "?", formatter.toString(charVar, options)); charVar = getVM().mirrorOf('中'); assertEquals("Should be able to format char type.", "中", formatter.toString(charVar, options)); }