public void testSendAndReceiveMarshalResponse() throws Exception {
Marshaller marshallerMock = createMock(Marshaller.class);
template.setMarshaller(marshallerMock);
marshallerMock.marshal(isA(Object.class), isA(Result.class));
Unmarshaller unmarshallerMock = createMock(Unmarshaller.class);
template.setUnmarshaller(unmarshallerMock);
Object unmarshalled = new Object();
expect(unmarshallerMock.unmarshal(isA(Source.class))).andReturn(unmarshalled);
connectionMock.send(isA(WebServiceMessage.class));
expect(connectionMock.hasError()).andReturn(false);
expect(connectionMock.receive(messageFactory)).andReturn(new MockWebServiceMessage("<response/>"));
expect(connectionMock.hasFault()).andReturn(false);