@Test
    void testWordAlternativesWithOrigin() {
        QueryTree q = parse("select * from sources * where foo contains" +
                " ({origin: {original: \" trees \", offset: 1, length: 5}}" +
                "alternatives({trees: 1.0, tree: 0.7}))");
        Item root = q.getRoot();
        assertSame(WordAlternativesItem.class, root.getClass());
        WordAlternativesItem alternatives = (WordAlternativesItem) root;
        checkWordAlternativesContent(alternatives);
        Substring origin = alternatives.getOrigin();
        assertEquals(1, origin.start);
        assertEquals(6, origin.end);
        assertEquals("trees", origin.getValue());
        assertEquals(" trees ", origin.getSuperstring());
    }
Specification for the conversion of YQL+ expressions to Vespa search queries.

@author Steinar Knutsen
@author Stian Kristoffersen
container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java