WebServiceMessageFactory factoryMock = createMock(WebServiceMessageFactory.class);
expect(factoryMock.createWebServiceMessage()).andReturn(responseMock);
MessageContext messageContext = new DefaultMessageContext(requestMock, factoryMock);
Method response = getClass().getMethod("response", MyGenericType.class);
MethodEndpoint methodEndpoint = new MethodEndpoint(this, response);
expect(unmarshallerMock.unmarshal(isA(Source.class))).andReturn(new MyGenericType<MyType>());
marshallerMock.marshal(isA(MyGenericType.class), isA(Result.class));
replay(marshallerMock, unmarshallerMock, requestMock, responseMock, factoryMock);