context.checking(new Expectations()
{
{
allowing(consumer1).sequence();
will(new DoAllAction(countDown(latch), returnValue(Long.valueOf(8L))));
allowing(consumer2).sequence();
will(new DoAllAction(countDown(latch), returnValue(Long.valueOf(8L))));
allowing(consumer3).sequence();
will(new DoAllAction(countDown(latch), returnValue(Long.valueOf(8L))));
}
});
final boolean[] alerted = { false };
Thread t = new Thread(new Runnable()