public void testLeftOuterJoin() {
Table table = getPrimaryKeyTable();
Table otherTable = getForeignKeyTable(table);
SelectStatement statement = otherTable.getSelectStatement();
SelectTableReference tableReference = statement.getSelectTableReference();
JoinReference joinReference = tableReference.leftOuterJoin(table);
TableReference refLocal = tableReference;
TableReference refRef = tableReference.getRightJoinedTableReference();
joinReference.getOn().addJoin((ForeignKey) otherTable.getForeignKeys().next(),