This adds a factory method for creating ad-hoc Message instances. In particular, this is necessary because cmdChan is private. This allows writing tests that accept a Message where you can assert that the expected Command is sent along the channel. (also, calling Finish or Requeue an message w/o this channel will panic)
This adds a factory method for creating ad-hoc
Message
instances. In particular, this is necessary becausecmdChan
is private. This allows writing tests that accept aMessage
where you can assert that the expectedCommand
is sent along the channel. (also, callingFinish
orRequeue
an message w/o this channel will panic)