Object extracted = new Object();
expect(extractorMock.extractData(isA(WebServiceMessage.class))).andReturn(extracted);
connectionMock.send(isA(WebServiceMessage.class));
expect(connectionMock.hasError()).andReturn(false);
expect(connectionMock.receive(messageFactory)).andReturn(new MockWebServiceMessage("<response/>"));
expect(connectionMock.hasFault()).andReturn(false);
replay(connectionMock, interceptorMock1, interceptorMock2, requestCallback, extractorMock);
Object result = template.doSendAndReceive(messageContext, connectionMock, requestCallback, extractorMock);