### Question:
Dom { public FluentWebElement parent() { WebElement parentElement = LocatorProxies.createWebElement(() -> webElement.findElement(By.xpath("parent::*"))); return instantiator.newComponent(FluentWebElement.class, parentElement); } Dom(WebElement element, ComponentInstantiator instantiator); FluentWebElement parent(); FluentList<FluentWebElement> ancestors(); FluentList<FluentWebElement> descendants(); FluentList<FluentWebElement> followings(); FluentList<FluentWebElement> followingSiblings(); FluentList<FluentWebElement> precedings(); FluentList<FluentWebElement> precedingSiblings();  }### Answer:
@Test public void testParent() { Dom dom = new Dom(element, instantiator); WebElement parent = mock(WebElement.class); when(element.findElement(By.xpath("parent::*"))).thenReturn(parent); assertThat(dom.parent().getElement()).isEqualTo(parent); }