### Question:
BasicPath implements Path { @Override public Path contains(Path path) { return ancestorOf(path); } private  BasicPath(Optional<WebElement> underlying,
                      Optional<String> xpath,
                      List<ElementProperty> elementProperties,
                      Optional<String> xpathExplanation,
                      Optional<String> describedBy,
                      Optional<String> insideXpath,
                      Optional<String> alternateXpath
    ); static PathBuilder builder(); static Path textNode(String text); static BasicPath customElement(String el); static BasicPath customNameSpaceElement(String el); static ChildNumber childNumber(Integer n); static GlobalOccurrenceNumber occurrenceNumber(Integer n); static Path firstOccurrenceOf(Path path); static Path lastOccurrenceOf(Path path); @Override Optional<String> getXPath(); @Override Optional<String> getAlternateXPath(); @Override Optional<WebElement> getUnderlyingSource(); @Override Optional<String> getXpathExplanation(); @Override Optional<String> getDescribedBy(); @Override List<ElementProperty> getElementProperties(); @Override Path describedBy(String description); @Override Path or(Path path); @Override Path that(ElementProperty... prop); @Override Path and(ElementProperty... prop); @Override Path withText(String txt); @Override Path inside(final Path path); @Override Path insideTopLevel(); @Override Path afterSibling(Path path); @Override Path immediatelyAfterSibling(Path path); @Override Path after(Path path); @Override Path beforeSibling(Path path); @Override Path immediatelyBeforeSibling(Path path); @Override Path before(Path path); @Override Path childOf(Path path); @Override Path parentOf(Path path); @Override Path containing(Path path); @Override Path contains(Path path); @Override Path ancestorOf(Path path); @Override Path descendantOf(Path path); @Override Path withGlobalIndex(Integer n); @Override Path withClass(String cssClass); @Override Path withClasses(String... cssClasses); @Override Path withTextContaining(String txt); @Override String toString(); static final BasicPath element; static final BasicPath div; static final BasicPath span; static final BasicPath image; static final BasicPath listItem; static final BasicPath button; static final BasicPath unorderedList; static final BasicPath input; static final BasicPath anchor; static final BasicPath form; static final BasicPath iframe; static final BasicPath html; static final BasicPath body; static final BasicPath header1; static final BasicPath header2; static final BasicPath header3; static final BasicPath header4; static final BasicPath header5; static final BasicPath header6; static final BasicPath header; static final BasicPath title; static final BasicPath tr; static final BasicPath td; static final BasicPath th; static final BasicPath table; static final BasicPath select; static final BasicPath option; static final BasicPath label; static final BasicPath section; static final BasicPath canvas; static final BasicPath textarea; static final BasicPath svg; }### Answer:
@Test public void containsTest() { Path el = div.contains(div.withClass("a.a")); NodeList nodes = findAllByXpath("<div>a</div><div class='container'><div class='a'><div class='a.a'></div></div><span class='b'/></div><div>c</div><div></div><span class='abc'></span>", el); assertThat(nodes.getLength(), is(2)); assertThat(getCssClass(nodes.item(0)), equalTo("container")); assertThat(getCssClass(nodes.item(1)), equalTo("a")); assertThat(el.toString(), is(equalTo("div, ancestor of div, that has class a.a"))); }