'mocked method not called after zip when method called in service class
I have service code like this:
forexample
- Mono.zip(map(string, object), stringlist, customers).zipwhen(resp->
- custom.readdevice("abcde", false).collectmap(sss->sss.getdeviceid()))
where custom.readdevice("abcde", false) is a mock method
I mocked this method in test class
Device device = new Device();
device.setdeviceid("DD");
Flux fluxdevice = Flux.just(device);
Mockito.lenient().when(custom.readdevice("abcde", false)).thenReturn(fluxdevice);
when I run this code until line1 code getting executed after that mocked method not called
if I try mocked method outside Mono.zip it executes very well but not in Mono.zip
please help me
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|