addListener(examinedListener);
}
notificationsPool.shutdown();
condition.set(false);
assertTrue(notificationsPool.awaitTermination(TIMEOUT, TimeUnit.SECONDS));
if (totalListenersFailures != 0) {
// If no listener failures, then all the listeners do not report any failure.
int countTestFailures = examinedListeners.length - countReportedTestFailures(examinedListeners);
assertThat(totalListenersFailures, is(countTestFailures));