Unit-testing a class that calls a static method
问题 I am trying to unit-test a class 'A' which calls a static method of a class 'B'. Class 'B' essentially has a google guava cache which retrieves a value(Object) from the cache given a key, or loads the object into the cache (in case of a cache-miss) using a service adapter. The service-adapter class in turn has other autowired dependencies to retrieve the object. These are the classes for illustration purposes: Class A public class A { public Object getCachedObject(String key) { return B