public async Task GetConsentsTest() { List <string> expected = new List <string> { "test-consent1", "test-consent2" }; mockServer .Given( Request.Create() .WithPath("/trial/configuration/v1/consents/Identity Verification/US") .WithHeader("x-trulioo-api-key", TEST_API_KEY) .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(200) .WithHeader("Content-Type", "application/json") .WithBody(JsonConvert.SerializeObject(expected)) ); try { List <string> result = configurationApi.GetConsents("trial", "Identity Verification", "US"); Assert.Equal(result, expected); } catch (ApiException e) { Console.WriteLine(e); Assert.True(false, "Unexpected ApiException"); } try { List <string> result = await configurationApi.GetConsentsAsync("trial", "Identity Verification", "US"); Assert.Equal(result, expected); } catch (ApiException) { Assert.True(false, "Unexpected ApiException"); } }