public function testApiEncode_EncodesProtocol()
{
$status = 404;
$headers = ['Cache-Control' => 'no-cache, must-revalidate, max-age=0', 'Connection' => 'keep-alive', 'Content-Encoding' => 'gzip', 'Content-Type' => 'text/html; charset=iso-8859-2', 'Date' => 'Tue, 23 Aug 2016 18:27:12 GMT'];
$body = 'text message';
$vers = '1.1';
$req = $this->createResponse($status, $headers, $body, $vers);
$expected = sprintf("HTTP/%s %d %s\r\n%s\r\n%s", $vers, (string) $status, 'Not Found', $this->callProtectedMethod($req, 'encodeHeaders', [$headers]), $body);
$this->assertSame($expected, $req->encode());
}