}
@Test
public void testFuzzyQuery2()
throws Exception {
final NodeQuery q1 = new NodeFuzzyQuery(new Term(SirenTestCase.DEFAULT_TEST_FIELD, "michel"));
this._assertSirenQuery(new LuceneProxyNodeQuery(q1), "michel~");
final TwigQuery q2 = new TwigQuery(1);
q2.addChild(q1, NodeBooleanClause.Occur.MUST);
this._assertSirenQuery(new LuceneProxyNodeQuery(q2), "* : michel~");
final int numEdits = FuzzyQuery.floatToEdits(0.8f, "michel".codePointCount(0, "michel".length()));
final NodeQuery q3 = new NodeFuzzyQuery(new Term(SirenTestCase.DEFAULT_TEST_FIELD, "michel"), numEdits);
this._assertSirenQuery(new LuceneProxyNodeQuery(q3), "michel~0.8");
// first tilde is escaped, not the second one
final NodeQuery q4 = new NodeFuzzyQuery(new Term(SirenTestCase.DEFAULT_TEST_FIELD, "http://sw.deri.org/~aida"));
this._assertSirenQuery(new LuceneProxyNodeQuery(q4), "'http://sw.deri.org/~aida'~");
}