public void setupScanRangeLocations() throws Exception {
        List<RemoteFileDesc> files = fileTable.getFileDescs();
        for (RemoteFileDesc file : files) {
            addScanRangeLocations(file);
        }
    }
@Test
    public void testSetupScanRangeLocations() throws Exception {
        class ExtFileTable extends FileTable {
            public ExtFileTable(Map<String, String> properties)
                    throws DdlException {
                super(0, "XX", new ArrayList<>(), properties);
            }

            @Override
            public List<RemoteFileDesc> getFileDescsFromHdfs() throws DdlException {
                List<RemoteFileDesc> fileDescList = new ArrayList<>();
                List<RemoteFileBlockDesc> blockDescList = new ArrayList<>();

                class Block extends RemoteFileBlockDesc {
                    public Block() {
                        super(0, 0, new long[] {10}, new long[] {20}, null);
                    }

                    @Override
                    public String getDataNodeIp(long hostId) {
                        return "XXX";
                    }
                }
                blockDescList.add(new Block());
                RemoteFileDesc fileDesc = new RemoteFileDesc("aa", "snappy", 0, 0, ImmutableList.copyOf(blockDescList));
                fileDescList.add(fileDesc);
                return fileDescList;
            }
        }

        Map<String, String> properties = new HashMap<String, String>() {
            {
                put(FileTable.JSON_KEY_FILE_PATH, "hdfs://127.0.0.1:10000/hive/");
                put(FileTable.JSON_KEY_COLUMN_SEPARATOR, "XXX");
                put(FileTable.JSON_KEY_ROW_DELIMITER, "YYY");
                put(FileTable.JSON_KEY_COLLECTION_DELIMITER, "ZZZ");
                put(FileTable.JSON_KEY_MAP_DELIMITER, "MMM");
                put(FileTable.JSON_KEY_FORMAT, "text");
            }
        };
        FileTable table = new ExtFileTable(properties);

        TupleDescriptor desc = new TupleDescriptor(new TupleId(0));
        desc.setTable(table);
        FileTableScanNode scanNode = new FileTableScanNode(new PlanNodeId(0), desc, "XXX");
        scanNode.setupScanRangeLocations();
    }