New tests for TokenCloudCredentials

Replaces hard-to-run integration test with self-contained
unit tests.