public async Task AddLabelAsync_Given_NewLabel_Should_Return_Id() { var label = new NewLabel() { Name = "labelname", PhoneNumber = "+44 (0) 7427 66 09 03", Email = "*****@*****.**", Url = "http://www.domain.com", Address = new RequestAddress() { AddressLine1 = "Addessline 1", AddressLine2 = "Address Line 2", AddressLine3 = "Address Line 3", City = "City", Locality = "Locality", PostalCode = "PostalCode", Country = "Country" } }; string id = Guid.NewGuid().ToString(); labelManager .Setup(s => s.InsertLabelAsync(It.IsAny <NewLabel>())) .Returns(Task.FromResult(id)); var retval = await _labelController.AddLabelAsync(label) as CreatedResult; Assert.AreEqual(id, retval.Value); }