public async Task AddRecords() { var keys = new[] { key }; Assert.ThrowsAsync <ArgumentNullException>(async() => await client.AddRecords(null, new Identity()).ConfigureAwait(false)); Assert.ThrowsAsync <ArgumentNullException>(async() => await client.AddRecords <Identity>(keys, null).ConfigureAwait(false)); await client.AddRecords(keys, data).ConfigureAwait(false); persistency.Verify(item => item.AddRecords(database.Object, keys, data)); }