### Question:
DefaultMetaDataFactory implements MetaDataFactory { public Map<String, Object> create() { return Collections.unmodifiableMap(metadata); } DefaultMetaDataFactory();  DefaultMetaDataFactory(final Map<String, Object> metadata); Map<String, Object> create();  }### Answer:
@Test public void shouldCreateEmptyMapByDefault() { assertTrue(victim.create().isEmpty()); }
@Test(expected = UnsupportedOperationException.class) public void cannotMutateCreatedMap() { victim.create().put("key", "value"); }
@Test public void shouldReturnExistingKey() { final Map<String, Object> map = new HashMap<String, Object>(); map.put("key", "value"); victim = new DefaultMetaDataFactory(map); assertEquals(map, victim.create()); assertEquals("value", victim.create().get("key")); }