public async Task Assign_Should_Return_Ok_When_Tasks_Complete_Normally() { string deviceId = "testDeviceId"; CancellationToken token = new CancellationToken(); _rabbitMock.Setup(r => r.SendAssignDeviceMsg(deviceId, token)).Returns(Task.CompletedTask); _mongoMock.Setup(m => m.InsertDevice(It.IsAny <Device>())).Returns(Task.CompletedTask); var result = await _controller.Assign(deviceId, token); Assert.True(result is OkObjectResult); }