public function testPicksThePrioritizedMediaTypeIfMoreThanOneWithSameQualityAreSupportedByTheUserAgent()
{
$requestHeaders = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');
$requestHeaders->expects($this->once())->method('get')->with('Accept', '*/*')->will($this->returnValue('application/*'));
$this->request->headers = $requestHeaders;
$this->contentNegotiation->expects($this->any())->method('isAcceptable')->will($this->returnValue(1));
$this->response->expects($this->once())->method('setVary')->with('Accept');
$this->responseFormatter->negotiate($this->event);
$this->assertSame('json', $this->responseFormatter->getFormatter());
}