What is the use of mock callouts in Apex?
They are used for testing purposes, because it is impossible to perform a callout in method annotated with @isTest
. And because it is necessary to have test coverage of at least 75% of all the code in org which includes the code which performs callouts and the coverage should pass with 100% score. Ok, that is clear for me.
But what benefit are you getting from writing two equal values manually (the first one is a return value of a mock method and the second one is the value you are expecting) and then making sure that they are really the same (when you know they are)? That does not make sense for me at all. Would not it be better to just exclude the code which performs callouts from those 100% out of which 75% should be covered?