How to mock a class called later than the method you are testing?
I am writing the unit test of a method x of class A, but this method, among other things, creates an instance of a class B that uses a service C which is normally executed by an Application server. The problem is to create a mock of the C …