Issue
I have a SOAP client provided below:
@Component
public class Sales2Client extends XWebserviceClient {
private static final Logger LOG = LoggerFactory.getLogger(Sales2Client.class);
@Autowired
@Qualifier("sales2Template")
private WebServiceTemplate webServiceTemplate;
public Sales2ObjectFactory factory;
private DateTimeConverter dateTimeConverter;
}
Thank you.
Solution
As you have two components of the same type you have to qualify the name:
@MockBean(name = "sales2Client")
private Sales2Client sales2Client;
Answered By - Simon Martinelli