public void givenWsdlFileInServiceDefinition_SoapServiceShouldBeConfiguredWithInputStreamWsdlProvider()
throws Exception {
ServiceDefinition sdef = new ServiceDefinition();
sdef.setOperationDefinitions(Collections.EMPTY_LIST);
sdef.setWsdlFilepath(WSDL_FILE_PATH);
Service soapService = SoapProtocol.SOAP1_1.getServiceFactory().createInstance(sdef);
assertThat(soapService.getWsdlProvider(), instanceOf(InputStreamWsdlProvider.class));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
((InputStreamWsdlProvider)soapService.getWsdlProvider()).writeWSDL(baos, null);
String wsdl = FileUtils.readFileToString(new File(WSDL_FILE_PATH));
assertThat(baos.toString(), is(wsdl));
}