@Test(timeout = 10000)
public void testOnEventLoopIteration() throws Exception {

    CountingRunnable onIteration = new CountingRunnable();
    loopC.executeAfterEventLoopIteration(onIteration);
    CountingRunnable noopTask = new CountingRunnable();
    loopC.submit(noopTask).sync();
    loopC.iterationEndSignal.take();
    MatcherAssert.assertThat("Unexpected invocation count for regular task.",
                             noopTask.getInvocationCount(), is(1));
    MatcherAssert.assertThat("Unexpected invocation count for on every eventloop iteration task.",
                             onIteration.getInvocationCount(), is(1));
}