*/
public void testCallCloseOnProtocol() throws XDIMEException {
// Create test objects.
DataHandlingStrategyMock strategy =
new DataHandlingStrategyMock("strategy", expectations);
XDIMEContextInternal context =
prepareEnvironment("DOMActivate", submissionID);
// Set expectations.
requestContext.expects.getEnvironmentContext().returns(envContext);
envContext.expects.getCachingDirectives().returns(null);
strategy.expects.getCharacterData().returns(VALUE_FROM_BODY);
XFSubmitElementImpl submitElement = new XFSubmitElementImpl(context);
XFActionAttributes attributes =
(XFActionAttributes) submitElement.getProtocolAttributes();
FieldDescriptor fd = new FieldDescriptor();
attributes.setFieldDescriptor(fd);
context.pushElement(submitElement);
// Run test.
XFSetValueElementImpl setValue =
new XFSetValueElementImpl(context, strategy);
setValue.callCloseOnProtocol(context);