### Question:
JOOX { public static FastFilter matchTag(final String regex) { return matchTag(regex, true); } static  Match(); static  Match(Object object); static  Match(String name); static  Match(String name, String content); static  Match(String name, Element... content); static  Match(String name, Match... content); static  Match(Document document); static  Match(Element element); static  Match(Node node); static  Match(NodeList list); static  Match(Context context); static  Match(Match match); static  Match(URL url); static  Match(URI uri); static  Match(File file); static  Match(InputStream stream); static  Match(Reader reader); static  Match(InputSource source); static FastFilter none(); static FastFilter all(); static FastFilter even(); static FastFilter odd(); static FastFilter leaf(); static FastFilter at(final int... indexes); static Filter selector(final String selector); static FastFilter tag(final String tagName); static FastFilter tag(final String tagName, final boolean ignoreNamespace); static FastFilter namespacePrefix(final String namespacePrefix); static FastFilter namespaceURI(final String namespaceURI); static FastFilter matchText(final String regex); static FastFilter matchAttr(final String name, final String valueRegex); static FastFilter matchTag(final String regex); static FastFilter matchTag(final String regex, final boolean ignoreNamespace); static FastFilter attr(final String name); static FastFilter attr(final String name, final String... values); static Filter and(final Filter... filters); static Filter or(final Filter... filters); static Filter not(final Filter filter); static FastFilter ids(String... ids); static Content content(final String value); static Content content(final Object value); static Mapper<String> ids(); static Mapper<String> attrs(final String attributeName); static Mapper<String> paths(); static Each chain(final Each... each); static Each chain(final Iterable<? extends Each> each); static Iterable<Element> iterable(NodeList elements); static Iterator<Element> iterator(NodeList elements); static List<Element> list(NodeList elements); static DocumentBuilder builder(); @SuppressWarnings("unchecked") static T convert(String value, Class<T> type); static List<T> convert(List<String> values, Class<T> type);  }### Answer:
@Test public void testSort() throws Exception { assertEquals(11, $.find().matchTag("books?").sort(new SimpleElementComparator()).size()); assertEquals(asList("books", "book", "book", "book", "book", "books", "book", "book", "books", "book", "book"), $.find().matchTag("books?").tags()); assertEquals(asList("book", "book", "book", "book","book", "book", "book", "book", "books", "books", "books"), $.find().matchTag("books?").sort(new SimpleElementComparator()).tags()); }