Using mock package of testify the project implements a sample for testing methods need to send a request to external services including external APIs or databases.
After downloading the project and going to the directory just run tests using:
go test ./... -v