/**
  * @test
  */
 public function it_returns_null_when_a_parse_exception_occurs_when_searching_by_username()
 {
     $username = '******';
     $query = new \CultureFeed_SearchUsersQuery();
     $query->nick = $username;
     $this->cultureFeed->expects($this->once())->method('searchUsers')->with($query)->willThrowException(new \CultureFeed_ParseException('error'));
     $user = $this->service->getUserByUsername($username);
     $this->assertNull($user);
 }