public function testHeaderProcessing()
 {
     $headers = ["header1" => [], "header2" => ["value"], "header3" => ["value1", "value2"]];
     $this->request->shouldReceive("getUri->__toString")->andReturn("");
     $this->request->shouldReceive("getBody->getContents")->andReturn("");
     $this->request->shouldReceive("getHeaders")->andReturn($headers);
     $transferStats = $this->createTransferStats(null, null);
     $processor = new ApiRequestProcessor();
     $processor->recordTransferStats($transferStats);
     $record = ["extra" => []];
     $record = $processor($record);
     $this->assertArrayHasKey("extra", $record);
     $extra = $record["extra"];
     $this->assertArrayHasKey("requestHeaders", $extra);
     $expected = "header2: value\nheader3: value1\nheader3: value2";
     $this->assertEquals($expected, $extra["requestHeaders"]);
 }