what you are doing with testaccountmanager could probably be done with less lines of code with a mock class that just mocks revokegaiatokenonserver  then you can expect call getlastrevokedrefreshtoken  called with with the right argument  times i forgot the proper syntax  