### Question:
ImplicitTemplateMap extends HashMap<String, Object> { @Override public Object get(final Object key) { Object result = super.get(key); if (result == null) { result = templateValues[index++]; super.put(key.toString(), result); } return result; } ImplicitTemplateMap(final Object[] templateValues); @Override Object get(final Object key); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test public void testSimple() { final ImplicitTemplateMap map = new ImplicitTemplateMap(new Object[] {"a", "b"}); assertEquals("a", map.get("foo")); assertEquals("a", map.get("foo")); }