(feat) unit testing done for the api endpoints.