This is part of JavaUnitTestChallengeSolved. -- DonWells ---- Now lets try four threads together: public class F''''''ourThreadsTogether extends Test { public BoundedBuffer buffer; public P''''''utThread firstPutThread; public P''''''utThread secondPutThread; public T''''''akeThread firstTakeThread; public T''''''akeThread secondTakeThread; public void setUp(){ buffer = new BoundedBuffer(); firstPutThread = new P''''''utThread(buffer); secondPutThread = new P''''''utThread(buffer); firstTakeThread = new T''''''akeThread(buffer); secondTakeThread = new T''''''akeThread(buffer);} public void runTest (){ T''''''akeThread.resetOutput(); firstTakeThread.start(); secondTakeThread.start(); firstPutThread.start(); secondPutThread.start(); waitForTakeToFinish(); should(T''''''akeThread.doesOuputHaveTwoOf("a"), "should get two a"); should(T''''''akeThread.doesOuputHaveTwoOf("b"), "should get two b"); should(T''''''akeThread.doesOuputHaveTwoOf("c"), "should get two c"); should(T''''''akeThread.doesOuputHaveTwoOf("d"), "should get two d"); should(T''''''akeThread.doesOuputHaveTwoOf("e"), "should get two e");} public void waitForTakeToFinish(){ try { firstTakeThread.join(1000); secondTakeThread.join(1000);} catch (InterruptedException exception) {};} } http://members.aol.com/jdwells123/fourtogetherpass.gif I was expecting problems of some sort with this one, but it runs just fine.