Mocking authorize of oauth.