'Mocikto testcase is throwing cannot cast to Javax.xml.ws.BindingProvider error
My app is consuming the soap service and i have below code.
//EmpDelegate wsdl generated class
public Map<String,Object> getServiceMap(EmpDelegate delegate)
{
return ((Bindingprovider)delegate.getRequestContext();
}
My testcase:
@InjectMocks
EmpUtility utility;
@Mock
EmpDelegate delegate:
@Test
public void getEmpService(){
utility.getServicemap(delegte);
}
}
when i run the testcase, it is throwing error
cannot cast to Javax.xml.ws.BindingProvider
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
