TypedMap implements Map<String, Object> { public Set<String> keySet() { return inner.keySet(); } TypedMap(final RecordType type);  TypedMap(final RecordType type, final Map<? extends String, ? extends Object> map); RecordType getType(); Type getFieldType(final String fieldName); void clear(); boolean containsKey(Object arg0); boolean containsValue(Object arg0); Set<Entry<String, Object>> entrySet(); Object get(Object arg0); boolean isEmpty(); Set<String> keySet(); Object put(String arg0, Object arg1); void putAll(Map<? extends String, ? extends Object> arg0); Object remove(Object arg0); int size(); Collection<Object> values(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testKeySet() throws Exception { Map<String, Object> values = new HashMap<String, Object>(); values.put("intValue", 1); values.put("booleanValue", true); String[] stringArray = new String[] { "a", "b", "c" }; values.put("stringArray", stringArray); TypedMap map = new TypedMap(recordType, values); Set<String> keySet = map.keySet(); assertEquals(3, keySet.size()); assertTrue(keySet.contains("intValue")); assertTrue(keySet.contains("booleanValue")); assertTrue(keySet.contains("stringArray")); }