@Override
    public List<PartitionInfo> getRemotePartitions(Table table, List<String> partitionNames) {
        ImmutableList.Builder<Partition> partitionBuilder = ImmutableList.builder();
        Map<String, Partition> existingPartitions = hmsOps.getPartitionByNames(table, partitionNames);
        partitionBuilder.addAll(existingPartitions.values());
        return fileOps.getRemotePartitions(partitionBuilder.build());
    }
@Test
    public void testGetRemotePartitions(
            @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://path_to_table/" + name;
            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;
            }
        };

        List<PartitionInfo> partitionInfoList = hiveMetadata.getRemotePartitions(table, partitionNames);
        Assert.assertEquals(3, partitionInfoList.size());
    }