### Question:
AttributeMap implements Serializable { public static AttributeMap mapOf(AttributeValue<?>... values) { Map<AttributeKey<?>, Object> delegate = new HashMap<AttributeKey<?>, Object>(Math.min(values.length, 1)); for(AttributeValue<?> value: values) { delegate.put(value.getKey(), value.getValue()); } return new AttributeMap(delegate); } protected  AttributeMap(Map<AttributeKey<?>, Object> delegate); static AttributeMap newMap(); static AttributeMap mapOf(AttributeValue<?>... values); static AttributeMap copyOf(AttributeMap map); static AttributeMap unmodifiableCopy(AttributeMap map); static AttributeMap filterKeys(
         AttributeMap attributes,
         // TODO predicate would be nice here but we can't depend on guava or jdk 1.8
         Set<AttributeKey<?>> keys
   ); static AttributeMap emptyMap(); V get(AttributeKey<V> key); V set(AttributeKey<V> key, V value); boolean setIfNotNull(AttributeKey<V> key, V value); V add(AttributeValue<V> attribute); V remove(AttributeKey<V> key); void addAll(AttributeMap attributes); Set<AttributeKey<?>> keySet(); Iterable<AttributeValue<?>> entries(); int size(); boolean isEmpty(); boolean containsKey(AttributeKey<?> key); Map<String, Object> toMap(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testMapOf() throws Exception { AttributeKey<String> testKey = AttributeKey.create("test", String.class); AttributeMap map = AttributeMap.mapOf(); assertEquals(AttributeMap.emptyMap(), map); map.set(testKey, "value"); assertEquals(map, AttributeMap.mapOf(testKey.valueOf("value"))); }