public function testSetCallback() {
$response = JsonResponse::create(array(
'foo' => 'bar',
))
->setCallback('callback');
$this
->assertEquals('callback({"foo":"bar"});', $response
->getContent());
$this
->assertEquals('text/javascript', $response->headers
->get('Content-Type'));
}