### Question:
ReportContentRegistry { @SuppressWarnings("unchecked") public <C extends SubContent> ReportContentFactory<C> getFactory(Class<C> contentClass) { return map.get(contentClass); } ReportContentRegistry(ObjectFactory objectFactory, Resources resources); @SuppressWarnings("unchecked") ReportContentFactory<C> getFactory(Class<C> contentClass);  }### Answer:
@Test public void findsFactoryForContent() throws Exception { ReportContentFactory factoryRegisteredForDummyContent = new DummyContentFactory(); objectFactory.add(ReportContentFactory.class, factoryRegisteredForDummyContent); ReportContentFactory<DummyContent> result = new ReportContentRegistry(objectFactory, null).getFactory(DummyContent.class); assertThat(result, is(factoryRegisteredForDummyContent)); }