### Question:
ArrayMap implements Map<K, V> { @Override public final V get(Object key) { for ( int i=0; i<keys.length; i++ ) { K k = keys[i]; if ( k == key || k.equals(key) ) { return values[i]; } } return null; } private  ArrayMap(final K[] keys, final V[] values); static final ArrayMap<K,V> createMap(final K[] keys, final V[] values); @Override final int size(); @Override final boolean isEmpty(); @Override final boolean containsKey(Object key); @Override final boolean containsValue(Object value); @Override final V get(Object key); @Override final V put(K key, V value); @Override final V remove(Object key); @Override final void putAll(Map<? extends K, ? extends V> m); @Override final void clear(); @Override final Set<K> keySet(); @Override final Collection<V> values(); @Override final Set<java.util.Map.Entry<K, V>> entrySet();  }### Answer:
@Test public void testGet() { String[] keys = new String[]{"key1", "key2"}; String[] values = new String[]{"value1", "value2"}; Map<String, String> map = ArrayMap.createMap(keys, values); assertEquals("value1", map.get("key1")); assertEquals("value2", map.get("key2")); assertEquals(null, map.get("key3")); }