BooleanFormatter 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 boolVar = getVM().mirrorOf(true); assertEquals("Should be able to format boolean type.", "true", formatter.toString(boolVar, options)); boolVar = getVM().mirrorOf(false); assertEquals("Should be able to format boolean type.", "false", formatter.toString(boolVar, options)); }