### Question:
MultiTermSpanQuery extends DatatypedSpanQuery { @Override public void setLevelConstraint(final int levelConstraint) { super.setLevelConstraint(levelConstraint); this.query.setLevelConstraint(levelConstraint); } @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 testSetLevelConstraint() { NodeWildcardQuery term1 = new NodeWildcardQuery(new Term(DEFAULT_TEST_FIELD, "aaa*")); MultiTermSpanQuery mtsq = new MultiTermSpanQuery(term1); mtsq.setLevelConstraint(3); assertEquals(3, mtsq.getLevelConstraint()); assertEquals(3, mtsq.query.getLevelConstraint()); }