BooleanFormatter implements IValueFormatter { @Override public boolean acceptType(Type type, Map<String, Object> options) { if (type == null) { return false; } char signature0 = type.signature().charAt(0); return signature0 == BOOLEAN; }  @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 testAcceptType() throws Exception { ObjectReference foo = this.getObjectReference("Foo"); assertFalse("Should not accept null type.", formatter.acceptType(null, new HashMap<>())); assertFalse("Should not accept Foo type.", formatter.acceptType(foo.referenceType(), new HashMap<>())); ObjectReference str = this.getObjectReference("java.lang.String"); assertFalse("Should not accept String type.", formatter.acceptType(str.referenceType(), new HashMap<>())); Value boolVar = getVM().mirrorOf(true); assertTrue("Should accept boolean type.", formatter.acceptType(boolVar.type(), new HashMap<>())); boolVar = this.getLocalValue("boolVar"); assertFalse("Should not accept Boolean type.", formatter.acceptType(boolVar.type(), new HashMap<>())); }