Timeline for answer to Spring boot mocked object returning null on call by vsk.rahul
Current License: CC BY-SA 4.0
Post Revisions
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 8, 2018 at 7:34 | comment | added | Florian Schaetz |
If Request does not implement equals in a way that reqA.equals( actualRequest ) returns true, then Mockito will not know that this "actualRequest" is the one you are looking for. By moving it into the test method, I assume you are then using reqA as the actual request, which of course works, since reqA == reqA, allowing Mockito to realize that this is the one you are waiting for.
|
|
| May 8, 2018 at 7:15 | history | answered | vsk.rahul | CC BY-SA 4.0 |