public function testApiHandleSendRequest_HandlesMessagUsingOutput()
{
$name = 'name';
$message = new Protocol();
$flags = 'flags';
$success = function () {
};
$failure = function () {
};
$abort = function () {
};
$timeout = 2.0;
$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));
$result = $this->callProtectedMethod($channel, 'handleSendRequest', [$name, $message, $flags, $success, $failure, $abort, $timeout]);
$this->assertSame($status, $result);
}