This repository shows different mechanisms that I've used for testing:
-
Controller class offers a /testLocal uri This is used for Gherkin-based acceptance testing The controller utilizes a service to provide data.
-
BasicStubUserController is used to call a service provided through my actuator-demo project. (Pretending to use as a consumer of that project.)
The class StubVerifier uses this controller and the actuator-demo stubs stored in the 'libs' folder.
You can run the StubVerifier class and see how the producer class is stubbed.