public function testCheckCredentialsActionWithException()
 {
     $this->curl->expects($this->once())->method('setCredentials')->with('username', 'password');
     $this->curl->expects($this->once())->method('getStatus')->will($this->throwException(new \Exception("Test error")));
     $this->curl->expects($this->never())->method('getBody')->willReturn("{'someJson}");
     $expectedValue = '{"success":false,"message":"Test error"}';
     $returnValue = $this->packagesAuth->checkCredentials('username', 'password');
     $this->assertSame($expectedValue, $returnValue);
 }