public function testGetsAllUsers()
 {
     $userId = 123232;
     $userItemView = new UserItemView();
     $userItemView->Id = $userId;
     $userItemView->DateCreated = Date::Now();
     $userItemView->LastLogin = Date::Now();
     $userList = array($userItemView);
     $users = new PageableData($userList);
     $attributes = array(new FakeCustomAttribute(1), new FakeCustomAttribute(2));
     $username = '******';
     $position = 'position';
     $att1 = 'att1';
     $this->server->SetQueryString(WebServiceQueryStringKeys::USERNAME, $username);
     $this->server->SetQueryString(WebServiceQueryStringKeys::POSITION, $position);
     $this->server->SetQueryString('att1', $att1);
     $expectedFilter = new UserFilter($username, null, null, null, null, null, $position, array(new Attribute($attributes[0], $att1)));
     $this->userRepositoryFactory->expects($this->once())->method('Create')->with($this->equalTo($this->server->GetSession()))->will($this->returnValue($this->userRepository));
     $this->userRepository->expects($this->once())->method('GetList')->with($this->isNull(), $this->isNull(), $this->isNull(), $this->isNull(), $expectedFilter->GetFilter(), AccountStatus::ACTIVE)->will($this->returnValue($users));
     $this->attributeService->expects($this->once())->method('GetByCategory')->with($this->equalTo(CustomAttributeCategory::USER))->will($this->returnValue($attributes));
     $expectedResponse = new UsersResponse($this->server, $userList, array(1 => 'fakeCustomAttribute1', 2 => 'fakeCustomAttribute2'));
     $this->service->GetUsers();
     $this->assertEquals($expectedResponse, $this->server->_LastResponse);
 }