I am writing a unit test by mocking out external services
com.example.Service service;
service = RealServiceClient.getService().getServiceId("1");
How can I simulate the above RealService
class?
The thing is RealServiceClient.getService()
returns RealService
.
PS: I am new to Java.