@Override
protected void assertResult() throws Exception {
assertEquals(expected, listener._numberOfReceivedEvents);
}
};
helper.assertWithTimeout(5000);
}
// allows just enough time for the event threads to run
private static void assertReceivedEventsForClass(final int expected) throws Exception {
ThreadedTestHelper helper = new ThreadedTestHelper() {