ThreadsComponentFactory implements ComponentFactory { @Override public EntranceProcessingItem createEntrancePi(EntranceProcessor entranceProcessor) { return new ThreadsEntranceProcessingItem(entranceProcessor); }  @Override ProcessingItem createPi(Processor processor); @Override ProcessingItem createPi(Processor processor, int paralellism); @Override EntranceProcessingItem createEntrancePi(EntranceProcessor entranceProcessor); @Override Stream createStream(IProcessingItem sourcePi); @Override Topology createTopology(String topoName);  }
@Test public void testCreateEntrancePi() { EntranceProcessingItem entrancePi = factory.createEntrancePi(entranceProcessor); assertNotNull("EntranceProcessingItem created is null.",entrancePi); assertEquals("EntranceProcessingItem created is not a ThreadsEntranceProcessingItem.",ThreadsEntranceProcessingItem.class,entrancePi.getClass()); assertSame("EntranceProcessor is not set correctly.",entranceProcessor, entrancePi.getProcessor()); }