wrote unit tests for oauth2-client