public long getMaxSize() {
        return maxSize;
    }
@Test
    public void fileMaxSizeTest() {
        FileSegment fileSegment = new PosixFileSegment(
            storeConfig, FileSegmentType.COMMIT_LOG, MessageStoreUtil.toFilePath(mq), 100L);
        Assert.assertEquals(storeConfig.getTieredStoreCommitLogMaxSize(), fileSegment.getMaxSize());
        fileSegment.destroyFile();

        fileSegment = new PosixFileSegment(
            storeConfig, FileSegmentType.CONSUME_QUEUE, MessageStoreUtil.toFilePath(mq), 100L);
        Assert.assertEquals(storeConfig.getTieredStoreConsumeQueueMaxSize(), fileSegment.getMaxSize());
        fileSegment.destroyFile();

        fileSegment = new PosixFileSegment(
            storeConfig, FileSegmentType.INDEX, MessageStoreUtil.toFilePath(mq), 100L);
        Assert.assertEquals(Long.MAX_VALUE, fileSegment.getMaxSize());
        fileSegment.destroyFile();
    }