@Test
	public void testConcurrent()
	{
		final int SENDERS = 6;
		final int SENDS_PER_SENDER = 100;
		final int TOTAL_SENDS = SENDERS * SENDS_PER_SENDER;
		
		final AtomicInteger sends = new AtomicInteger();
		final AtomicInteger receives = new AtomicInteger();
		final Signal signal = new Signal();
		
		GroupTask.initialize(SENDERS + 1);
		
		Runnable sender = new Runnable() {
			public void run() {
				for (int i = 0; i < SENDS_PER_SENDER; i++) {
					signal.send();
					sends.incrementAndGet();	
				}
			}
		};
		Runnable reciever = new Runnable() {
			public void run() {
				while (receives.get() < TOTAL_SENDS) {
					receives.getAndAdd(signal.receive());	
				}
			}
		};

		GroupTask.add(sender, SENDERS);	
		GroupTask.add(reciever);
		
		GroupTask.execute();

		assertEquals( sends.get(), receives.get() );
		assertEquals( TOTAL_SENDS, receives.get() );
	}