public async Task TestGetContactInfoById() { personService.Setup(x => x.GetContactInfoByIdAsync(It.IsAny <int>())) .ReturnsAsync(new ContactInfoDTO()); var response = await controller.GetContactInfoByIdAsync(1); Assert.IsInstanceOfType(response, typeof(OkNegotiatedContentResult <ContactInfoDTO>)); }