Query query = new Query();
Select select = new Select();
select.addSymbol(new ElementSymbol("b"));//$NON-NLS-1$
query.setSelect(select);
From from = new From();
UnaryFromClause ufc = new UnaryFromClause();
ufc.setGroup(new GroupSymbol("t1")); //$NON-NLS-1$
UnaryFromClause ufc2 = new UnaryFromClause();
ufc2.setGroup(new GroupSymbol("t2")); //$NON-NLS-1$
ufc2.setOptional(true);
List criteria = new ArrayList();
criteria.add(new CompareCriteria(new ElementSymbol("t1.a"), AbstractCompareCriteria.EQ, new ElementSymbol("t2.a")));//$NON-NLS-1$//$NON-NLS-2$
JoinPredicate joinPredicate = new JoinPredicate(ufc, ufc2, JoinType.JOIN_LEFT_OUTER, criteria);
UnaryFromClause ufc3 = new UnaryFromClause();
ufc3.setGroup(new GroupSymbol("t3")); //$NON-NLS-1$
ufc3.setOptional(true);
criteria = new ArrayList();
criteria.add(new CompareCriteria(new ElementSymbol("t1.a"), AbstractCompareCriteria.EQ, new ElementSymbol("t3.a")));//$NON-NLS-1$//$NON-NLS-2$
JoinPredicate joinPredicate2 = new JoinPredicate(joinPredicate, ufc3, JoinType.JOIN_LEFT_OUTER, criteria);
from.addClause(joinPredicate2);
query.setFrom(from);
TestParser.helpTest(sql, "SELECT b FROM (t1 LEFT OUTER JOIN /*+ optional */ t2 ON t1.a = t2.a) LEFT OUTER JOIN /*+ optional */ t3 ON t1.a = t3.a", query); //$NON-NLS-1$
}