public synchronized void run() {
try {
for (int i = 0; i < 10; ++i) {
consumer.receive(100 + (i * 1000));
synchronized (consumer) {
consumer.notifyAll();
}
}
msg = "Should have thrown an IllegalStateException";
} catch (Exception ex) {
LOG.info("Caught exception on receive(1000): {}", ex);