ObjectMap extends AbstractMap<String, Object> { @Override public boolean containsKey(Object key) { return (key instanceof String && definition.getField((String) key) != null) || extras.containsKey(key); } ObjectMap();  ObjectMap(Object object); Object getObject(); void setObject(Object object); Converter getConverter(); void setConverter(Converter converter); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override Set<Map.Entry<String, Object>> entrySet(); @Override Object get(Object key); @Override boolean isEmpty(); @Override Set<String> keySet(); @Override Object put(String key, Object value); @Override void putAll(Map<? extends String, ? extends Object> map); @Override Object remove(Object key); @Override int size(); @Override Collection<Object> values();  }
@Test public void containsKey_objfields_public() { ObjectMap objmap = new ObjectMap(new ObjContainsKey()); assertTrue(objmap.containsKey("field_pub")); }
@Test public void containsKey_objfields_private() { ObjectMap objmap = new ObjectMap(new ObjContainsKey()); assertTrue(objmap.containsKey("field_priv")); }
@Test public void containsKey_objfields_unknown() { ObjectMap objmap = new ObjectMap(new ObjContainsKey()); assertFalse(objmap.containsKey("field2")); }
@Test public void containsKey_objfields_nonstring() { ObjectMap objmap = new ObjectMap(new ObjContainsKey()); assertFalse(objmap.containsKey(new Integer(1))); }
@Test public void containsKey_objfields_inherit() { ObjectMap objmap = new ObjectMap(new ObjContainsKey() { String field_child = "child field value"; }); assertTrue(objmap.containsKey("field_pub")); assertTrue(objmap.containsKey("field_child")); }