Unit testing anything with global variables is a real pain, and it would make life a lot easier if each package would expose Client as an interface and then use something like https://github.com/vektra/mockery to generate mocks for all the clients so that proper testing can be easily implemented.