Should you test service2?
If service2 is obviously correct because it is so simple you can inspect it - then you probably do not need tests for it. However if it is any more complex then that, then you probably want to test it.
I can see that it must be doing at least 3 things:
- does something with
url
- calls success callback only if operation was successful, and calls it with all the correct parameters based upon output of operation
- calls error callback only if operation was not successful, and calls it with all the correct parameters based upon the output (such as error codes and messages)
To me, this amount of work would lead me to add some tests - haven't even though about exception handling for instance... The testing of it, since it is simple, should also be simple.
Testing service1
If service1 contains a complicated callback then it definitely should be tested. Make sure that callback is accessible from your tests so you can test it thoroughly in isolation from the rest of what service1 might be doing before passing it off to service2.
Conclusion
Ultimately you are asking an opinion question, and one that relies upon a lot of information about your codebase, goals, and deadlines which we do not know. My best answer is: test service2.