public static Endpoint create(QName serviceName, String endpoint,
BindingType bindingType, TransportType transportType)
throws Exception {
Endpoint eprProvider = createNiceMock(Endpoint.class);
expect(eprProvider.getServiceName()).andStubReturn(serviceName);
expect(eprProvider.getAddress()).andStubReturn(endpoint);
expect(eprProvider.getBinding()).andStubReturn(bindingType);
expect(eprProvider.getTransport()).andStubReturn(transportType);
eprProvider.writeEndpointReferenceTo(anyDOMResult(), (Endpoint.PropertiesTransformer) EasyMock.anyObject());
expectLastCall().asStub();
replay(eprProvider);
return eprProvider;