public function testApiHandleSendAsync_HandlesMessageUsingOutput()
{
$name = 'name';
$message = new Protocol();
$flags = 'flags';
$status = true;
$mock = $this->getMock(RouterComposite::class, ['handle'], [], '', false);
$mock->expects($this->once())->method('handle')->with($name, $message, $flags)->will($this->returnValue($status));
$channel = $this->createChannel(['getOutput']);
$channel->expects($this->once())->method('getOutput')->will($this->returnValue($mock));
$this->assertSame($status, $this->callProtectedMethod($channel, 'handleSendAsync', [$name, $message, $flags]));
$this->assertSame(Channel::TYPE_SND, $message->getType());
$this->assertSame($name, $message->getDestination());
}