void () { final Listener listener3 = new Listener() { @Override public void foo() { myBuffer.append("[3]"); } }; Listener listener1 = new Listener() { @Override public void foo() { myBuffer.append("[1.1]"); dispatchPendingEvent(listener3); myBuffer.append("[1.2]"); } }; Listener listener2 = new Listener() { @Override public void foo() { myBuffer.append("[2]"); } }; addListener(listener1); addListener(listener2); addListener(listener3); String result = "[1.1][3][1.2][2]"; checkResult(result); }