### Question:
AttributeMap implements Serializable { public static AttributeMap unmodifiableCopy(AttributeMap map) { if(map == null || map.isEmpty()) { return emptyMap(); } Map<AttributeKey<?>, Object> delegate = new HashMap<AttributeKey<?>, Object>(map.delegate); return new AttributeMap(Collections.unmodifiableMap(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 testUnmodifiableCopy() throws Exception { AttributeMap map = AttributeMap.newMap(); AttributeMap copy = AttributeMap.unmodifiableCopy(map); assertEquals(map, copy); map.set(AttributeKey.create("test", String.class), "value"); assertTrue(copy.isEmpty()); assertFalse(map.isEmpty()); }