@Test
public void testToString() throws Exception {

    Value boolVar = getVM().mirrorOf(true);
    Map<String, Object> options = formatter.getDefaultOptions();
    assertEquals("Failed to format boolean type.", boolVar.type().name(),
        formatter.toString(boolVar.type(), options));
    ObjectReference foo = this.getObjectReference("Foo");
    assertEquals("Failed to format Foo type.", foo.type().name(),
        formatter.toString(foo.type(), options));
    ObjectReference str = this.getObjectReference("java.lang.String");
    assertEquals("Failed to format String type.", "String",
        formatter.toString(str.type(), options));
    options.put(SimpleTypeFormatter.QUALIFIED_CLASS_NAME_OPTION, true);
    assertEquals("Failed to format boolean type.", boolVar.type().name(),
        formatter.toString(boolVar.type(), options));
    assertEquals("Failed to format Foo type.", foo.type().name(),
        formatter.toString(foo.type(), options));
    assertEquals("Failed to format String type.", "java.lang.String",
        formatter.toString(str.type(), options));
}