NullObjectFormatter implements IValueFormatter { @Override public String toString(Object value, Map<String, Object> options) { return NULL_STRING; }  @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); static final String NULL_STRING; }
@Test public void testToString() throws Exception { Map<String, Object> options = formatter.getDefaultOptions(); assertEquals("Should be able to format string type.", "null", formatter.toString(null, options)); assertEquals("Should be able to format string type.", "null", formatter.toString(null, options)); }