### Question:
MetastoreUtil { public static Properties getHiveSchema(Table table) { return getHiveSchema( table.getStorage(), table.getDataColumns(), table.getDataColumns(), table.getParameters(), table.getDatabaseName(), table.getTableName(), table.getPartitionColumns()); } private  MetastoreUtil(); static Properties getHiveSchema(Table table); static Properties getHiveSchema(Partition partition, Table table); static ProtectMode getProtectMode(Partition partition); static ProtectMode getProtectMode(Table table); static boolean isAvroTableWithSchemaSet(Table table); static String makePartitionName(Table table, Partition partition); static String makePartitionName(List<Column> partitionColumns, List<String> values); static String toPartitionName(List<String> names, List<String> values); static String getPartitionLocation(Table table, Optional<Partition> partition); static void verifyOnline(SchemaTableName tableName, Optional<String> partitionName, ProtectMode protectMode, Map<String, String> parameters); static void verifyCanDropColumn(HiveMetastore metastore, HiveIdentity identity, String databaseName, String tableName, String columnName); static PrincipalPrivileges buildInitialPrivilegeSet(String tableOwner); static boolean isPartitionKeyFilterFalse(TupleDomain<String> partitionKeysFilter); static Optional<List<String>> partitionKeyFilterToStringList(List<String> columnNames, TupleDomain<String> partitionKeysFilter, boolean assumeCanonicalPartitionKeys); static boolean canConvertSqlTypeToStringForParts(Type type, boolean assumeCanonicalPartitionKeys); static String sqlScalarToStringForParts(Type type, Object value, boolean assumeCanonicalPartitionKeys, String partitionWildcardString); static String sqlScalarToString(Type type, Object value, String nullString); static TupleDomain<String> computePartitionKeyFilter(List<HiveColumnHandle> partitionKeys, TupleDomain<HiveColumnHandle> effectivePredicate);  }### Answer:
@Test public void testHiveSchemaTable() { Properties expected = MetaStoreUtils.getTableMetadata(TEST_TABLE_WITH_UNSUPPORTED_FIELDS); expected.remove(COLUMN_NAME_DELIMITER); Properties actual = MetastoreUtil.getHiveSchema(ThriftMetastoreUtil.fromMetastoreApiTable(TEST_TABLE_WITH_UNSUPPORTED_FIELDS, TEST_SCHEMA)); assertEquals(actual, expected); }
@Test public void testHiveSchemaPartition() { Properties expected = MetaStoreUtils.getPartitionMetadata(TEST_PARTITION_WITH_UNSUPPORTED_FIELDS, TEST_TABLE_WITH_UNSUPPORTED_FIELDS); expected.remove(COLUMN_NAME_DELIMITER); Properties actual = MetastoreUtil.getHiveSchema(ThriftMetastoreUtil.fromMetastoreApiPartition(TEST_PARTITION_WITH_UNSUPPORTED_FIELDS), ThriftMetastoreUtil.fromMetastoreApiTable(TEST_TABLE_WITH_UNSUPPORTED_FIELDS, TEST_SCHEMA)); assertEquals(actual, expected); }