expect(sl.getEndpoint(SERVICE_NAME, ENDPOINTURL)).andStubReturn(
endpoint);
expect(endpoint.getProperties()).andStubReturn(slPropertiesImpl);
replayAll();
W3CEndpointReference endpointRef, expectedRef;
W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
// builder.serviceName(SERVICE_NAME);
builder.address(ENDPOINTURL);
EndpointTransformerImpl transformer = new EndpointTransformerImpl();
DOMResult result = new DOMResult();
transformer.writePropertiesTo(slPropertiesImpl, result);
Document docResult = (Document) result.getNode();
builder.metadata(docResult.getDocumentElement());
expectedRef = builder.build();
endpointRef = lps.lookupEndpoint(SERVICE_NAME, null);
assertTrue(endpointRef.toString().equals(expectedRef.toString()));
}