ThreadsStream extends AbstractStream { public void addDestination(StreamDestination destination) { destinations.add(destination); maxCounter *= destination.getParallelism(); } ThreadsStream(IProcessingItem sourcePi); void addDestination(StreamDestination destination); List<StreamDestination> getDestinations(); @Override synchronized void put(ContentEvent event);  }
@Test public void testAddDestination() { boolean found = false; for (StreamDestination sd:stream.getDestinations()) { if (sd == destination) { found = true; break; } } assertTrue("Destination object was not added in stream's destinations set.",found); }