@Test
  public void noConstraints() throws TException {
    Table table = testTables[0];
    SQLAllTableConstraints constraints = new SQLAllTableConstraints();
    constraints.setPrimaryKeys(new ArrayList<>());
    constraints.setForeignKeys(new ArrayList<>());
    constraints.setNotNullConstraints(new ArrayList<>());
    constraints.setCheckConstraints(new ArrayList<>());
    constraints.setDefaultConstraints(new ArrayList<>());
    constraints.setUniqueConstraints(new ArrayList<>());
    AllTableConstraintsRequest request =
        new AllTableConstraintsRequest(table.getDbName(), table.getTableName(), table.getCatName());
    SQLAllTableConstraints fetched = client.getAllTableConstraints(request);
    Assert.assertEquals(constraints, fetched);
  }
Test where no constraint is present in the table
@throws TException
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestGetAllTableConstraints.java