org.easymock.EasyMock.expectLastCall().times(1);
org.easymock.EasyMock.replay(differentActionListener);
differentUiCommand.addActionListener(differentActionListener);
// Simulates first event, in most cases click in GUI
ActionEvent invokeApplicationEvent = new ActionEvent(uiCommand);
invokeApplicationEvent.queue();
// tested method: In this method is actionListener called and that
// listener itself queues new event
facesContext.getViewRoot().broadcastEvents(facesContext, PhaseId.INVOKE_APPLICATION);