public function testRemoveListener()
{
$this->Crud->addListener('api', 'Crud.Api');
$listeners = $this->Crud->config('listeners');
$expected = ['api' => ['className' => 'Crud.Api']];
$this->assertEquals($expected, $listeners);
$this->Crud->removeListener('api');
$listeners = $this->Crud->config('listeners');
$this->assertEquals([], $listeners);
// Should now throw an exception
$this->setExpectedException('Exception', 'Listener "api" is not configured');
$this->Crud->listener('api');
}