public async Task InterServiceDisposeNullFailureFunc() { // Setup: Create a query service and dispose params var qes = new QueryExecutionService(null, null); Func <Task> successFunc = () => Task.FromResult(0); // If: I call the inter-service API to dispose a query with a null success function // Then: It should throw await Assert.ThrowsAsync <ArgumentNullException>( () => qes.InterServiceDisposeQuery(Constants.OwnerUri, successFunc, null)); }