assertEquals(0, queue2.memoryRefCount());
assertEquals(0, queue2.getDeliveringCount());
//Now kill office 2 - this should cause office1 to remove the dead held transaction
office2.stop();
Thread.sleep(2000);
assertTrue(office1.getHoldingTransactions().isEmpty());
//The delivery should be cancelled back to the queue too