Tests for HttpAdapter
Bug fixes and tests in AzureAd flow.