@Test public void testFirst() { ElementLocator locator = mock(ElementLocator.class); when(locator.findElements()).thenReturn(Arrays.asList(element1, element2, element3)); List<WebElement> webElementList = LocatorProxies.createWebElementList(locator); WebElement first = LocatorProxies.first(webElementList); assertThat(LocatorProxies.loaded(first)).isFalse(); assertThat(first).isEqualTo(element1); }