public function testBeforeHandlerForMaintenanceMode()
{
$this->setRequest(Request::create('/'));
$this->getService('config')->set('general/maintenance_mode', true);
$permissions = $this->getMockPermissions();
$permissions->expects($this->any())->method('isAllowed')->will($this->returnValue(false));
$this->setService('permissions', $permissions);
$response = $this->controller()->before($this->getRequest());
$this->assertEquals(503, $response->getStatusCode());
}