public void ProcessTansaction_TransactionValuesGiven_TellerSubmitsGivenTransactionToTheRepository() { var transaction = new SimpleTransaction(10); var processTransactionTrigger = new ManualResetEvent(false); Mock.Get(_accountRepository).Setup(x => x.ProcessTransactions(transaction)) .Callback(() => processTransactionTrigger.Set()); _teller.ProcessTransaction(transaction); processTransactionTrigger.WaitOne(TimeSpan.FromSeconds(1)); Mock.Get(_accountRepository).Verify(x => x.ProcessTransactions(transaction), Times.Once(), "The teller should forward the process transaction request to the repository."); }