public function testChangeIdentityValid()
 {
     // Get valid identity first
     $this->_auth->login('user1', 'password1');
     $this->_auth->changeIdentity('test');
     $this->assertEquals('test', $this->_auth->getIdentity());
 }
 /**
  * Delete operator account
  *
  * @param string $id Login name of account to delete
  * @throws \RuntimeException if the account to delete is logged in for the current session
  */
 public function delete($id)
 {
     if ($id == $this->_authenticationService->getIdentity()) {
         throw new \RuntimeException('Cannot delete account of current user');
     }
     $this->_operators->delete(array('id' => $id));
 }