public function testGetUserByUsernameServerError()
 {
     $that = $this;
     $this->getMockHttpClient()->expects($this->once())->method('get')->will($this->returnValue($this->createMockRequest(function ($request) use($that) {
         return $that->throwException(ServerErrorResponseException::factory($request, $that->createMockResponse()));
     })));
     $this->setExpectedException('Guzzle\\Http\\Exception\\BadResponseException');
     $this->resource->getUserByUsername('test');
 }