### Question:
Selector { public static Element selectFirst(String cssQuery, Element root) { Validate.notEmpty(cssQuery); return Collector.findFirst(QueryParser.parse(cssQuery), root); } private  Selector(); static Elements select(String query, Element root); static Elements select(Evaluator evaluator, Element root); static Elements select(String query, Iterable<Element> roots); static Element selectFirst(String cssQuery, Element root);  }### Answer:
@Test public void selectFirst() { String html = "<p>One<p>Two<p>Three"; Document doc = Jsoup.parse(html); assertEquals("One", doc.selectFirst("p").text()); }
@Test public void selectFirstWithAnd() { String html = "<p>One<p class=foo>Two<p>Three"; Document doc = Jsoup.parse(html); assertEquals("Two", doc.selectFirst("p.foo").text()); }
@Test public void selectFirstWithOr() { String html = "<p>One<p>Two<p>Three<div>Four"; Document doc = Jsoup.parse(html); assertEquals("One", doc.selectFirst("p, div").text()); }