File wsdlFile = new File(WSDL_MULTI_LOC_FILE_PATH);
baseWsdl = FileUtils.readFileToString(wsdlFile);
String initialWsdl = baseWsdl.replace("$serviceLocation1$", "/service1");
initialWsdl = initialWsdl.replace("$serviceLocation2$", "/example2/service2");
initialWsdl = initialWsdl.replace("$serviceLocation3$", "http://foo.com/baa");
WsdlLocationToRequestUrlAdapter adapter = createAdapter(initialWsdl);
ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
adapter.writeWSDL(baos, request);
baos = new ByteArrayOutputStream(1024);
adapter.writeWSDL(baos, request);
String responseWsdl = new String(baos.toByteArray());
String expectedWsdl = baseWsdl.replace("$serviceLocation1$", "http://test.example.com:80/service1");
expectedWsdl = expectedWsdl.replace("$serviceLocation2$", "http://test.example.com:80/example2/service2");
expectedWsdl = expectedWsdl.replace("$serviceLocation3$", "http://test.example.com:80/baa");