### Question:
EntityContext { public void addMapping(Mapping mapping) { if (mapping != null) { mappings.put(mapping.getType(), mapping); } } EntityContext(final String id); void addMapping(Mapping mapping); boolean hasMapping(MappingType type); T getMapping(final MappingType type); Collection<Mapping> getMappings(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); String getId();  }### Answer:
@Test public void addMapping() { DMRMapping mapping = new DMRMapping().setAddress("/foo=bar"); cut.addMapping(mapping); assertEquals(1, cut.getMappings().size()); assertEquals(mapping, cut.getMappings().iterator().next()); }