This line basically means that Mockito is asked to verify if the getForObject()
method of RestTemplate object is called with the parameters urlCaptorAsUri.capture()
and any(Class.class)
. The parameter in the atLeast()
method tells Mockito to verify that the said method is called at least x
times, 0 means n number of times.
Reference: https://stackoverflow.com/questions/27787487/java-verify-void-method-calls-n-times-with-mockito
This code is used to capture the first argument when the method getForObject()
of RestTemplate object is called.
Reference: https://www.javadoc.io/doc/org.mockito/mockito-core/2.6.9/org/mockito/ArgumentCaptor.html
So from all the information provided, I think you are getting an assertion error in this code below.
assertTrue(!propertyKeyValues.isEmpty() || !propertyKeyValues2.isEmpty() || !propertyKeyValues3
.isEmpty());
This assertion is checking that all of the 3 captured arguments have value and none of them is null, true in the former case and false in the latter. But your error stack trace is showing false and that means one of the parameters is null. You need to carefully debug as to why this is happening as mentioned by @sashi_Crio.Do sir refer the threads, there is a high chance that someone has faced a similar problem.
Another note, give this article a read, will definitely help you.
Link: https://codeahoy.com/2016/04/30/do-experienced-programmers-use-google-frequently/