List jcrits2 = new ArrayList();
jcrits2.add(new CompareCriteria(e2, CompareCriteria.EQ, e3));
List jcrits3 = new ArrayList();
jcrits3.add(new CompareCriteria(e1, CompareCriteria.EQ, e4));
JoinPredicate jp1 = new JoinPredicate(g2, g3, JoinType.JOIN_RIGHT_OUTER, jcrits2);
JoinPredicate jp2 = new JoinPredicate(g1, jp1, JoinType.JOIN_INNER, jcrits1);
JoinPredicate jp3 = new JoinPredicate(jp2, g4, JoinType.JOIN_INNER, jcrits3);
from.addClause(jp3);
query.setFrom(from);
helpTest(sql, sqlExpected, query);