@Test
public void trigger_deferred()
{
Request request = mockRequest();
ComponentResources resources = mockComponentResources();
FormSupportImpl support = new FormSupportImpl();
String elementName = "myname";
train_getParameter(request, elementName, "login");
replay();
Submit submit = new Submit(request);
submit.setup(resources, support, null);
submit.processSubmission(support, elementName);
verify();
expect(resources.triggerEvent(Submit.SELECTED_EVENT, null, null)).andReturn(false);
replay();
support.executeDeferred();
verify();
}