public void Test_TheGeneratedToken_shouldBe_UsedFor_SubsequentRequest() { try { HttpRequestClient httpRequestClient = TestHelper.InitializeHttpRequestClientWithCorrectCredential(); // Generate a token a keep it in variable generatedBearerToken string generatedBearerToken = httpRequestClient.ExecuteBearerTokenRequest().GetAwaiter().GetResult(); // Make request to the API (e.g. create transaction, get transaction etc.) AccountResponse accountResults = httpRequestClient.ExecuteAccountRequest("256784378515").GetAwaiter().GetResult(); string bearerTokenUsedForRetrievingAccountDetails = httpRequestClient.BearerToken; // Check that the two bearer tokens are the same Assert.AreEqual(generatedBearerToken, bearerTokenUsedForRetrievingAccountDetails); } catch (Exception ex) { Console.WriteLine(ex.Message); } }