@Test
public void trigger_immediate()
{
FormSupport support = mockFormSupport();
ComponentResources resources = mockComponentResources();
Heartbeat heartbeat = new HeartbeatImpl();
Request request = mockRequest();
String elementName = "myname";
train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
train_getParameter(request, elementName, "login");
replay();
heartbeat.begin();
Submit submit = new Submit(request);
TestBase.set(submit, "resources", resources, "formSupport", support, "heartbeat", heartbeat, "defer", false);
submit.processSubmission("xyz", elementName);
verify();
expect(resources.triggerEvent(EventConstants.SELECTED, null, null)).andReturn(false);
replay();
heartbeat.end();
verify();
}