MultiContainer { public V get(final K key, final S subContainer) { final Map<K, V> valueByKey = this.valueByKeyBySubContainer.get(subContainer); return valueByKey == null ? null : valueByKey.get(key); } MultiContainer(final Logger logger, final Class<S> subContainersEnum); void setMode(final Mode mode); boolean add(final K key, final S subContainer, final V value); V get(final K key, final S subContainer); void debug(); void freeze(); Map<K, V> getValueByKey(final S subContainer); Iterable<V> getValues(final S subContainer); @Override String toString();  }
@Test public final void testGet() { this.container.add("a", Dest.CONTENT_AUTOMATIC_STYLES, 1); Assert.assertEquals(Integer.valueOf(1), this.container.get("a", Dest.CONTENT_AUTOMATIC_STYLES)); Assert.assertNull(this.container.get("a", Dest.STYLES_AUTOMATIC_STYLES)); Assert.assertNull(this.container.get("b", Dest.CONTENT_AUTOMATIC_STYLES)); final Map<String, Integer> m = new HashMap<String, Integer>(); m.put("a", 1); Assert.assertEquals(m, this.container.getValueByKey(Dest.CONTENT_AUTOMATIC_STYLES)); }