@Test public void testCreatePiWithParallelism() { new NonStrictExpectations() { { processor.newProcessor(processor); result=processorReplica; } }; ProcessingItem pi = factory.createPi(processor,parallelism); assertNotNull("ProcessingItem created is null.",pi); assertEquals("ProcessingItem created is not a ThreadsProcessingItem.",ThreadsProcessingItem.class,pi.getClass()); assertEquals("Parallelism of PI is not ",parallelism,pi.getParallelism(),0); }
@Override public ProcessingItem createPi(Processor processor) { return this.createPi(processor, 1); }
ThreadsComponentFactory implements ComponentFactory { @Override public ProcessingItem createPi(Processor processor) { return this.createPi(processor, 1); } }
ThreadsComponentFactory implements ComponentFactory { @Override public ProcessingItem createPi(Processor processor) { return this.createPi(processor, 1); }  }
ThreadsComponentFactory implements ComponentFactory { @Override public ProcessingItem createPi(Processor processor) { return this.createPi(processor, 1); }  @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); }
ThreadsComponentFactory implements ComponentFactory { @Override public ProcessingItem createPi(Processor processor) { return this.createPi(processor, 1); }  @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);  }