### Question:
HMapKS implements MapKS<K>, Cloneable, Serializable { @Override public long dot(MapKS<K> m) { int s = 0; for (MapKS.Entry<K> e : m.entrySet()) { K key = e.getKey(); if (this.containsKey(key)) { s += this.get(key) * e.getValue(); } } return s; } @SuppressWarnings("unchecked")  HMapKS(int initialCapacity, float loadFactor);  HMapKS(int initialCapacity); @SuppressWarnings("unchecked")  HMapKS();  HMapKS(MapKS<? extends K> m); int size(); boolean isEmpty(); short get(K key); boolean containsKey(K key); short put(K key, short value); void putAll(MapKS<? extends K> m); short remove(K key); void clear(); boolean containsValue(short value); @SuppressWarnings("unchecked") Object clone(); Set<K> keySet(); Collection<Short> values(); Set<MapKS.Entry<K>> entrySet(); String toString(); @Override void plus(MapKS<K> m); @Override long dot(MapKS<K> m); @Override void increment(K key); @Override void increment(K key, short value);  }### Answer:
@Test public void testDot() throws IOException { HMapKS<Text> m1 = new HMapKS<Text>(); m1.put(new Text("hi"), (short) 5); m1.put(new Text("there"), (short) 2); m1.put(new Text("empty"), (short) 3); HMapKS<Text> m2 = new HMapKS<Text>(); m2.put(new Text("hi"), (short) 4); m2.put(new Text("there"), (short) 4); m2.put(new Text("test"), (short) 5); assertEquals(28, m1.dot(m2)); }