Testing this service is relatively simple. We can skip unit tests as we are not writing functions suited for those. It makes more sense to write a Postman test suite that will test the API endpoints. In Chapter 8, Testing Microservices you learned how to do that. So, let's apply that here, as follows:
- Open Postman and create a new test suite.
- Set up authentication so that we can test the admin functions as well.
- Go through the preceding routes and add a test for each one of them.
- Let Postman test this service and verify that it works as expected.