CharmDisplayPropertiesMap { public TreePresentationProperties getDisplayProperties(HeroType heroType) { return map.getForCharacterType(heroType); } CharmDisplayPropertiesMap(ObjectFactory objectFactory); TreePresentationProperties getDisplayProperties(HeroType heroType);  }
@Test public void findsPropertiesForCharacterType() throws Exception { TreePresentationProperties expectation = new DummyCharmPresentationProperties(); ConfigurableDummyObjectFactory factory = new ConfigurableDummyObjectFactory(); factory.add(CharmPresentationProperties.class, expectation); DummyHeroType characterType = new DummyHeroType(); TreePresentationProperties properties = new CharmDisplayPropertiesMap(factory).getDisplayProperties(characterType); assertThat(properties, is(expectation)); }