public void GetPeerCountResponse_Can_Get_Output() { //Arrange var getPeerCountResponse = new GetPeerCountResponse { PeerCount = 50 }; var commandContext = TestCommandHelpers.GenerateCliResponseCommandContext(_testScheduler); var getPeerCountCommand = new PeerCountCommand(commandContext, Substitute.For <ILogger>()); //Act TestCommandHelpers.GenerateResponse(commandContext, getPeerCountResponse); _testScheduler.Start(); //Assert commandContext.UserOutput.Received(1).WriteLine(getPeerCountResponse.ToJsonString()); }