public async Task Add_ReturnInternalServerErrorAfterError() { // Arrange unitOfWorkMock.Setup(x => x.CompleteAsync()).ThrowsAsync(new Exception()); // Act IHttpActionResult result = await controller.Add(It.IsAny <ServiceBindingModel>()); // Assert Assert.IsInstanceOfType(result, typeof(InternalServerErrorResult)); }