@Test
public void trigger_deferred()
{
Request request = mockRequest();
ComponentResources resources = mockComponentResources();
FormSupportImpl support = new FormSupportImpl(null, null);
String elementName = "myname";
// Also: test for the alternate, JavaScript oriented way, of determining the
// element/component that triggered the submission.
train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, "[ 'xyz', 'pdq' ]");
replay();
Submit submit = new Submit(request);
TestBase.set(submit, "resources", resources, "formSupport", support);
submit.processSubmission("xyz", elementName);
verify();
expect(resources.triggerEvent(EventConstants.SELECTED, null, null)).andReturn(false);
replay();
support.executeDeferred();