public FilePathInfo allocateFilePath(long dbId, long tableId) throws DdlException {
        try {
            FileStoreType fsType = getFileStoreType(Config.cloud_native_storage_type);
            if (fsType == null || fsType == FileStoreType.INVALID) {
                throw new DdlException("Invalid cloud native storage type: " + Config.cloud_native_storage_type);
            }
            String suffix = constructTablePath(dbId, tableId);
            FilePathInfo pathInfo = client.allocateFilePath(serviceId, fsType, suffix);
            LOG.debug("Allocate file path from starmgr: {}", pathInfo);
            return pathInfo;
        } catch (StarClientException e) {
            throw new DdlException("Failed to allocate file path from StarMgr, error: " + e.getMessage());
        }
    }
@Test
    public void testAllocateFilePath() throws StarClientException {
        long dbId = 1000;
        long tableId = 123;

        new Expectations() {
            {
                client.allocateFilePath("1", FileStoreType.S3, anyString);
                result = FilePathInfo.newBuilder().build();
                minTimes = 0;

                client.allocateFilePath("2", FileStoreType.S3, anyString);
                result = new StarClientException(StatusCode.INVALID_ARGUMENT, "mocked exception");
            }
        };

        Deencapsulation.setField(starosAgent, "serviceId", "1");
        Config.cloud_native_storage_type = "s3";
        ExceptionChecker.expectThrowsNoException(() -> starosAgent.allocateFilePath(dbId, tableId));

        Config.cloud_native_storage_type = "ss";
        ExceptionChecker.expectThrowsWithMsg(DdlException.class, "Invalid cloud native storage type: ss",
                () -> starosAgent.allocateFilePath(dbId, tableId));

        Config.cloud_native_storage_type = "s3";
        Deencapsulation.setField(starosAgent, "serviceId", "2");
        ExceptionChecker.expectThrowsWithMsg(DdlException.class,
                "Failed to allocate file path from StarMgr, error: INVALID_ARGUMENT:mocked exception",
                () -> starosAgent.allocateFilePath(dbId, tableId));

        new Expectations() {
            {
                client.allocateFilePath("1", "test-fskey", anyString);
                result = FilePathInfo.newBuilder().build();
                minTimes = 0;

                client.allocateFilePath("2", "test-fskey", anyString);
                result = new StarClientException(StatusCode.INVALID_ARGUMENT, "mocked exception");
            }
        };
        Config.cloud_native_storage_type = "s3";
        Deencapsulation.setField(starosAgent, "serviceId", "1");
        ExceptionChecker.expectThrowsNoException(() -> starosAgent.allocateFilePath("test-fskey", dbId, tableId));

        Deencapsulation.setField(starosAgent, "serviceId", "2");
        ExceptionChecker.expectThrowsWithMsg(DdlException.class,
                "Failed to allocate file path from StarMgr, error: INVALID_ARGUMENT:mocked exception",
                () -> starosAgent.allocateFilePath("test-fskey", dbId, tableId));
    }