public function testApiEncode_EncodesProtocolUsingPassedParser()
{
$encoder = $this->createEncoder();
$protocol = $this->createProtocol();
$result = $encoder->with($protocol)->encode();
$this->assertSame($this->encode($protocol), $result);
}