public function testExportAction()
 {
     $this->admin->expects($this->once())->method('isGranted')->with($this->equalTo('EXPORT'))->will($this->returnValue(true));
     $this->admin->expects($this->once())->method('getExportFormats')->will($this->returnValue(array('json')));
     $dataSourceIterator = $this->getMock('Exporter\\Source\\SourceIteratorInterface');
     $this->admin->expects($this->once())->method('getDataSourceIterator')->will($this->returnValue($dataSourceIterator));
     $this->request->query->set('format', 'json');
     $response = $this->controller->exportAction($this->request);
     $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\StreamedResponse', $response);
     $this->assertSame(200, $response->getStatusCode());
     $this->assertSame(array(), $this->session->getFlashBag()->all());
 }