public void AccountBalanceTest() { var mediator = new Mock <IMediator>(); var account_controller = new BankAccountController(mediator.Object); account_controller.createBankAccount(new System.Guid("99999999-9999-9999-9999-999999999998")); var result = account_controller.getAccountBalanceAsync(new System.Guid("99999999-9999-9999-9999-999999999998")); var obj_result = result.Result as ObjectResult; Assert.IsNotNull(obj_result); Assert.AreEqual(200, obj_result.StatusCode); }