public async Task Add_CommandReceiver_And_Process_Command_With_Success() { //Arrange MessagingHubListener.AddCommandReceiver(_commandReceiver); await MessagingHubConnection.ConnectAsync(); await MessagingHubListener.StartAsync(); //Act DispatchCommand(); await Task.Delay(TIME_OUT); //Assert Assert.AreEqual(CommandStatus.Pending, _someCommand.Status); _commandReceiver.ReceivedWithAnyArgs().ReceiveAsync(null, CancellationToken.None); }