diff --git a/SW.HttpExtensions.UnitTests/ApiClientBaseTests.cs b/SW.HttpExtensions.UnitTests/ApiClientBaseTests.cs
new file mode 100644
index 0000000..073c400
--- /dev/null
+++ b/SW.HttpExtensions.UnitTests/ApiClientBaseTests.cs
@@ -0,0 +1,163 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using SW.PrimitiveTypes;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Security.Claims;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace SW.HttpExtensions.UnitTests
+{
+ [TestClass]
+ public class ApiClientBaseTests
+ {
+ private class TestOptions : ApiClientOptionsBase
+ {
+ public override string ConfigurationSection => "Test";
+ }
+
+ /// Records every path it is asked for, and answers 200 with an empty object.
+ private class RecordingHandler : HttpMessageHandler
+ {
+ private readonly List paths = new List();
+ private readonly int delayMs;
+
+ public RecordingHandler(int delayMs = 0) => this.delayMs = delayMs;
+
+ public IReadOnlyList Paths
+ {
+ get { lock (paths) return paths.ToList(); }
+ }
+
+ protected override async Task SendAsync(HttpRequestMessage request,
+ CancellationToken cancellationToken)
+ {
+ lock (paths) paths.Add(request.RequestUri.PathAndQuery);
+ if (delayMs > 0) await Task.Delay(delayMs, cancellationToken);
+ return new HttpResponseMessage(HttpStatusCode.OK)
+ {
+ Content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json")
+ };
+ }
+ }
+
+ /// Two operations on one client, exactly as a generated SDK writes them.
+ private class TestClient : ApiClientBase
+ {
+ public TestClient(HttpClient httpClient, RequestContext requestContext, TestOptions options)
+ : base(httpClient, requestContext, options) { }
+
+ public Task> Alpha() =>
+ Builder.Path("alpha").AsApiResult