Based on this Q: https://stackoverflow.com/questions/50968762/callback-not-being-called I understand (and its obvious in retrospect) what I'm doing wrong. However given the scenario as unit testing the following:
Method 1(dependency1, dependency2)
How can I test that dependency2 is called based on a condition of dependency1 and I guess more importantly should I?
Edit: to explain why this is not a duplicate of (Why) is it important that a unit test not test dependencies? I'm asking essentially given a method which gets data from a cache service unless its empty in which case it calls another service (both passed in as dependencies) should I test that the 2nd service is called given a null cache. The original q https://stackoverflow.com/questions/50968762/callback-not-being-called has more details