@@ -0,0 +1,3085 @@
+package com.codeborne.selenide.impl;%0A%0Aimport com.codeborne.selenide.SelenideElement;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0Aimport org.openqa.selenium.WebElement;%0A%0Aimport java.util.Collections;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class SelenideElementListIteratorTest %7B%0A%0A  @Test%0A  public void testHasPrevious() %7B%0A    WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A    SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 1);%0A    assertTrue(selenideElementIterator.hasPrevious());%0A  %7D%0A%0A  @Test%0A  public void testPrevious() %7B%0A    WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A    WebElement mockedWebElement = Mockito.mock(WebElement.class);%0A    when(mockedWebElement.isDisplayed()).thenReturn(true);%0A    when(mockedWebElement.getTagName()).thenReturn(%22a%22);%0A    when(mockedWebElement.getText()).thenReturn(%22selenide%22);%0A%0A    when(mockedWebElementCollection.getActualElements()).thenReturn(Collections.singletonList(mockedWebElement));%0A%0A    SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 1);%0A    SelenideElement previous = selenideElementIterator.previous();%0A    assertTrue(previous != null);%0A    assertEquals(%22%3Ca%3Eselenide%3C/a%3E%22, previous.toString());%0A  %7D%0A%0A  @Test%0A  public void testNextIndex() %7B%0A    WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A    SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 1);%0A    assertEquals(2, selenideElementIterator.nextIndex());%0A  %7D%0A%0A  @Test%0A  public void testPreviousIndex() %7B%0A    WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A    SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 3);%0A    assertEquals(2, selenideElementIterator.previousIndex());%0A  %7D%0A%0A%0A  @Test%0A  public void testAdd() %7B%0A    try %7B%0A      WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A      SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 0);%0A      selenideElementIterator.add(Mockito.mock(SelenideElement.class));%0A    %7D catch (UnsupportedOperationException e) %7B%0A      assertEquals(%22Cannot add elements to web page%22, e.getMessage());%0A    %7D%0A  %7D%0A%0A  @Test%0A  public void testSet() %7B%0A    try %7B%0A      WebElementsCollection mockedWebElementCollection = Mockito.mock(WebElementsCollection.class);%0A      SelenideElementListIterator selenideElementIterator = new SelenideElementListIterator(mockedWebElementCollection, 0);%0A      selenideElementIterator.set(Mockito.mock(SelenideElement.class));%0A    %7D catch (UnsupportedOperationException e) %7B%0A      assertEquals(%22Cannot set elements to web page%22, e.getMessage());%0A    %7D%0A  %7D%0A%0A%7D%0A

add SelenideElementListIterator unit tests