Add tests for oauth2 library