NodeRelation label_fr_be = search("table1", "label_fr_be", rels);
NodeRelation label_en = search("table1", "label_en", rels);
NodeRelation label_noLang = search("table1", "label", rels);
Expr filterFR = new E_Equals(new E_Lang(new ExprVar("o")), NodeValue.makeString("fr"));
Expr filterEN_TAG_EN = new E_Equals(new E_Lang(new ExprVar("o")), NodeValue.makeNode("en", "en", (String) null));
Expr filterFR_BE = new E_Equals(new E_Lang(new ExprVar("o")), NodeValue.makeString("fr-BE"));
Expr filter = new E_Equals(new E_Lang(new ExprVar("o")), NodeValue.makeString(""));
assertEquals("LANG(label_fr_be) = \"fr\" should be FALSE", Expression.FALSE, TransformExprToSQLApplyer.convert(filterFR, label_fr_be));
assertEquals("LANG(label_en) = \"fr\" should be FALSE", Expression.FALSE, TransformExprToSQLApplyer.convert(filterFR, label_en));
assertEquals("LANG(label_fr_be) = \"fr_be\" should be TRUE", Expression.TRUE, TransformExprToSQLApplyer.convert(filterFR_BE, label_fr_be));
assertEquals("LANG(label_en) = \"en\"@en should be FALSE", Expression.FALSE, TransformExprToSQLApplyer.convert(filterEN_TAG_EN, label_en));