### Question:
KTypeVTypeHashMap implements /*! #if ($templateonly) !*/ Intrinsics.EqualityFunction, /*! #end !*/
             /*! #if ($templateonly) !*/ Intrinsics.KeyHasher<KType>, /*! #end !*/
             KTypeVTypeMap<KType, VType>,
             Preallocable,
             Cloneable,
             Accountable { @Override public VType put(KType key, VType value) { assert assigned < mask + 1; final int mask = this.mask; if (Intrinsics.<KType> isEmpty(key)) { hasEmptyKey = true; VType previousValue = Intrinsics.<VType> cast(values[mask + 1]); values[mask + 1] = value; return previousValue; } else { final KType[] keys = Intrinsics.<KType[]> cast(this.keys); int slot = hashKey(key) & mask; KType existing; while (!Intrinsics.<KType> isEmpty(existing = keys[slot])) { if (Intrinsics.<KType> equals(this, key, existing)) { final VType previousValue = Intrinsics.<VType> cast(values[slot]); values[slot] = value; return previousValue; } slot = (slot + 1) & mask; } if (assigned == resizeAt) { allocateThenInsertThenRehash(slot, key, value); } else { keys[slot] = key; values[slot] = value; } assigned++; return Intrinsics.<VType> empty(); } } KTypeVTypeHashMap();  KTypeVTypeHashMap(int expectedElements);  KTypeVTypeHashMap(int expectedElements, double loadFactor);  KTypeVTypeHashMap(KTypeVTypeAssociativeContainer<? extends KType, ? extends VType> container); @Override VType put(KType key, VType value); @Override int putAll(KTypeVTypeAssociativeContainer<? extends KType, ? extends VType> container); @Override int putAll(Iterable<? extends KTypeVTypeCursor<? extends KType, ? extends VType>> iterable); boolean putIfAbsent(KType key, VType value); @Override VType putOrAdd(KType key, VType putValue, VType incrementValue); @Override VType addTo(KType key, VType incrementValue); @Override VType remove(KType key); @Override int removeAll(KTypeContainer<? super KType> other); @Override int removeAll(KTypeVTypePredicate<? super KType, ? super VType> predicate); @Override int removeAll(KTypePredicate<? super KType> predicate); @Override VType get(KType key); @Override VType getOrDefault(KType key, VType defaultValue); @Override boolean containsKey(KType key); @Override int indexOf(KType key); @Override boolean indexExists(int index); @Override VType indexGet(int index); @Override VType indexReplace(int index, VType newValue); @Override void indexInsert(int index, KType key, VType value); @Override void clear(); @Override void release(); @Override int size(); boolean isEmpty(); @Override int hashCode(); @Override boolean equals(Object obj); @Override void ensureCapacity(int expectedElements); @Override long ramBytesAllocated(); @Override long ramBytesUsed(); @Override Iterator<KTypeVTypeCursor<KType, VType>> iterator(); @Override T forEach(T procedure); @Override T forEach(T predicate); KeysContainer keys(); @Override KTypeCollection<VType> values(); @Override KTypeVTypeHashMap<KType, VType> clone(); @Override String toString(); @Override String visualizeKeyDistribution(int characters); static KTypeVTypeHashMap<KType, VType> from(KType[] keys, VType[] values); @Override int hashKey(KType key); @Override boolean equals(Object v1, Object v2); public Object [] keys; public Object [] values; }### Answer:
@Test public void testCloningConstructor() { map.put(key1, value1); map.put(key2, value2); map.put(key3, value3); assertSameMap(map, new KTypeVTypeHashMap<>(map)); }
@Test public void testPut() { map.put(key1, value1); assertTrue(map.containsKey(key1)); assertEquals2(value1, map.get(key1)); }