@org.junit.Test
public void testCreateW3CEpr() throws Exception {
QName serviceName = new QName("http://cxf.apache.org", "ServiceName");
QName portName = new QName("http://cxf.apache.org", "PortName");
ProviderImpl impl = new ProviderImpl();
W3CEndpointReference w3Epr = impl.createW3CEndpointReference("http://myaddress", serviceName,
portName, null, "wsdlLoc",
null);
java.io.StringWriter sw = new java.io.StringWriter();
StreamResult result = new StreamResult(sw);
w3Epr.writeTo(result);
String expected = "<wsdl:definitions";
assertTrue("Embeded wsdl element is not generated", sw.toString().indexOf(expected) > -1);
assertTrue("wsdlLocation attribute has the wrong value",
sw.toString().contains(":wsdlLocation=\"http://cxf.apache.org wsdlLoc\""));
}