@Override
    public List<RemoteFileInfo> getRemoteFiles(Table table, GetRemoteFilesParams params) {
        List<Partition> partitions = buildGetRemoteFilesPartitions(table, params);

        boolean useCache = true;
        if (table instanceof HiveTable) {
            useCache = ((HiveTable) table).isUseMetadataCache();
        }
        // if we disable cache explicitly
        if (!params.isUseCache()) {
            useCache = false;
        }

        GetRemoteFilesParams updatedParams = params.copy();
        updatedParams.setUseCache(useCache);
        return fileOps.getRemoteFiles(table, partitions, updatedParams);
    }
@Test
    public void testGetRemoteFiles(
            @Mocked HiveTable table,
            @Mocked HiveMetastoreOperations hmsOps) {
        List<String> partitionNames = Lists.newArrayList("dt=20200101", "dt=20200102", "dt=20200103");
        Map<String, Partition> partitionMap = Maps.newHashMap();
        for (String name : partitionNames) {
            Map<String, String> parameters = Maps.newHashMap();
            TextFileFormatDesc formatDesc = new TextFileFormatDesc("a", "b", "c", "d");
            String fullPath = HDFS_HIVE_TABLE;
            Partition partition = new Partition(parameters, RemoteFileInputFormat.PARQUET, formatDesc, fullPath, true);
            partitionMap.put(name, partition);
        }

        new Expectations() {
            {
                hmsOps.getPartitionByNames((Table) any, (List<String>) any);
                result = partitionMap;
                minTimes = 1;
            }
        };

        GetRemoteFilesParams params = GetRemoteFilesParams.newBuilder().setPartitionNames(partitionNames).build();
        List<RemoteFileInfo> remoteFileInfos = hiveMetadata.getRemoteFiles(table, params);
        Assert.assertEquals(3, remoteFileInfos.size());
    }