this.eventQueue.add((BrokerAvailabilityEvent) event);
}
}
public void expectBrokerAvailabilityEvent(boolean isBrokerAvailable) throws InterruptedException {
BrokerAvailabilityEvent event = this.eventQueue.poll(20000, TimeUnit.MILLISECONDS);
assertNotNull("Times out waiting for BrokerAvailabilityEvent[" + isBrokerAvailable + "]", event);
assertEquals(isBrokerAvailable, event.isBrokerAvailable());
}