Mockito verify fails, shows additional empty line
When running JUnit tests on a legacy code base at work I got the familiar “Argument(s) are different! [….] Actual invocation has different arguments” notice from Mockito. I ran the tests from the command line, but as I could see no difference between the expected and actual output I re-ran the tests inside IntelliJ to investigate further, resulting in this: Notice the trailing newline in the actual request made. From the reported error above it wasn’t straight forward figuring out…