### Question:
MultiTermSpanQuery extends DatatypedSpanQuery { @Override public void setAncestorPointer(final NodeQuery ancestor) { super.setAncestorPointer(ancestor); this.query.setAncestorPointer(ancestor); } @SuppressWarnings({"rawtypes"})  MultiTermSpanQuery(Q query); @Override void setLevelConstraint(final int levelConstraint); @Override void setNodeConstraint(final int lowerBound, final int upperBound); @Override void setAncestorPointer(final NodeQuery ancestor); final SpanRewriteMethod getRewriteMethod(); final void setRewriteMethod(SpanRewriteMethod rewriteMethod); @Override String toString(String field); @Override Query rewrite(IndexReader reader); @Override int hashCode(); @Override @SuppressWarnings({"rawtypes"}) boolean equals(Object obj); final static SpanRewriteMethod SCORING_SPAN_QUERY_REWRITE; }### Answer:
@Test public void testSetAncestorPointer() { NodeWildcardQuery term1 = new NodeWildcardQuery(new Term(DEFAULT_TEST_FIELD, "aaa*")); MultiTermSpanQuery mtsq = new MultiTermSpanQuery(term1); final TwigQuery twig = new TwigQuery(); mtsq.setAncestorPointer(twig); assertSame(twig, mtsq.getAncestorPointer()); assertSame(twig, term1.getAncestorPointer()); }