public void Enqueue_transaction_should_invoke_the_transactionManager() { var channel = Substitute.For <ITcpChannel>(); var transactionManager = Substitute.For <ITransactionManager>(); Action commitAction = () => { }; Action rollbackAction = () => { }; var sut = new StompClient(channel, transactionManager); sut.EnqueueInTransaction("abc", commitAction, rollbackAction); transactionManager.Received().Enqueue("abc", commitAction, rollbackAction); }