@Test(expected=JoinToUnknownTableException.class)
public void joinToUnknown() throws StandardException {

    String sql = "CREATE TABLE t(id1 INT PRIMARY KEY, xid INT, GROUPING FOREIGN KEY(xid) REFERENCES x(id))";
    StatementNode stmt = parser.parseStatement(sql);
    TableDDL.createTable(ddlFunctions, null, DEFAULT_SCHEMA, (CreateTableNode)stmt, null);
}