Assert.assertEquals(2, tables.size()); List<SQLForeignKey> foreignKeys = objectStore.getForeignKeys(DEFAULT_CATALOG_NAME, DB1, TABLE1, null, null); Assert.assertEquals(0, foreignKeys.size()); foreignKeys = objectStore.getForeignKeys(DEFAULT_CATALOG_NAME, null, null, DB1, "new" + TABLE1); Assert.assertEquals(1, foreignKeys.size()); List<SQLForeignKey> fks = objectStore.getForeignKeys(DEFAULT_CATALOG_NAME, null, null, DB1, "new" + TABLE1); if (fks != null) { for (SQLForeignKey fkcol : fks) { foreignKeys = objectStore.getForeignKeys(DEFAULT_CATALOG_NAME, DB1, TABLE1, null, null); Assert.assertEquals(0, foreignKeys.size()); foreignKeys = objectStore.getForeignKeys(DEFAULT_CATALOG_NAME, null, null, DB1, "new" + TABLE1); Assert.assertEquals(0, foreignKeys.size());