@Test(expected = UnsupportedOperationException.class)
public void testValueOfNotSupported() {

    ObjectReference or = this.getObjectReference("Foo");
    formatter.valueOf("new Foo()", or.referenceType(), new HashMap<>());
    fail("Set value for object is not supported.");
}