I have a suite of microservices:
"Someone" can make a call to the ConnectorTypeA microservice to create a connector of type A, and it is needs to be known that "Someone" is the owner of that connector.
When ConnectorTypeA is created, it needs to register itself with ConnectorRegistrar.
The obvious option is to have ConnectorTypeA make an API call to ConnectorRegistrar to let it be known that "Someone" owns ConnectorTypeA.
The dilemma that I'm facing is I am not sure how to unit test this.
When we do the unit test for ConnectorTypeA creation, it will mock a creation through a database transaction. But if the API call is making another API call to the Registrar service, the Registrar will be making a record as well, which is wrong... as the unit test shouldn't trigger a permanent record.
Can someone please help me and point me in the right direction?