public function testAuthenticateHeaderFail()
{
$request = $this->getMockBuilder('\\Cake\\Network\\Request')->setMethods(['header'])->getMock();
$request->expects($this->once())->method('header')->with('api_key')->will($this->returnValue('wrong'));
$this->apiKey->config('type', 'header');
$result = $this->apiKey->authenticate($request, new Response());
$this->assertFalse($result);
}