protected XDIMEContextInternal prepareForCallCloseOnProtocol()
throws XDIMEException {
// callCloseOnProtocol assumes that callOpenOnProtocol and
// initialiseAttributes will have been called first, so duplicate this
XDIMEContextInternal context = new XDIMEContextImpl();
final XFormBuilder xFormBuilder = context.getXFormBuilder();
final String modelID = "modelID";
EmulatedXFormDescriptor fd = new EmulatedXFormDescriptor();
xFormBuilder.addModel(modelID, fd);
XDIMEAttributes attributes = new XDIMEAttributesImpl(getElementType());
attributes.setValue("", XDIMEAttribute.ID.toString(), "controlID");
attributes.setValue("", XDIMEAttribute.MODEL.toString(), modelID);
xFormBuilder.registerControl(attributes);
context.setInitialRequestContext(marinerRequestContextMock);
return context;
}