@Test
public void testValueOf() throws Exception {

    Map<String, Object> options = formatter.getDefaultOptions();
    Value charVar = getVM().mirrorOf('c');
    Value newValue = formatter.valueOf("M", charVar.type(), options);
    assertTrue("should return char type", newValue instanceof CharValue);
    assertEquals("should return char 'M'", 'M', ((CharValue)newValue).value());
    newValue = formatter.valueOf("'N'", charVar.type(), options);
    assertTrue("should return char type", newValue instanceof CharValue);
    assertEquals("should return char 'N'", 'N', ((CharValue)newValue).value());
    newValue = formatter.valueOf("?", charVar.type(), options);
    assertTrue("should return char type", newValue instanceof CharValue);
    assertEquals("should return char '?", '?', ((CharValue)newValue).value());
    newValue = formatter.valueOf("/", charVar.type(), options);
    assertTrue("should return char type", newValue instanceof CharValue);
    assertEquals("should return char '/'", '/', ((CharValue)newValue).value());
    newValue = formatter.valueOf("'", charVar.type(), options);
    assertTrue("should return char type", newValue instanceof CharValue);
    assertEquals("should return char '", '\'', ((CharValue)newValue).value());
}