private void assertLanguage(Language expectedLanguage, String languageParameter) {
        Query query = new Query("?query=test&language=" + languageParameter);
        Query query2 = new Query("?query=test");
        Model model = query.getModel();
        Model model2 = query2.getModel();

        assertEquals(expectedLanguage, query.getModel().getParsingLanguage());

        /*
        This should also work and give something else than und/unknown
        assertEquals("en", new Query("?query=test&language=en_US").getParsingLanguage().languageCode());
        assertEquals("nb_NO", new Query("?query=test&language=nb_NO").getParsingLanguage().languageCode());
        */
    }
<p>Tests that the correct query language strings are generated for various
query trees.</p>

<p>The opposite direction is tested by
{@link com.yahoo.prelude.query.parser.test.ParseTestCase}.
Note that the query language statements produced by a query tree is a
subset of the statements accepted by the parser.</p>

@author bratseth
container-search/src/test/java/com/yahoo/prelude/query/test/QueryLanguageTestCase.java