public synchronized Partition getPartition(long partitionId) {
        RecyclePartitionInfo partitionInfo = idToPartition.get(partitionId);
        if (partitionInfo != null) {
            return partitionInfo.getPartition();
        }
        return null;
    }
@Test
    public void testGetPartition() throws Exception {
        CatalogRecycleBin bin = new CatalogRecycleBin();
        List<Column> columns = Lists.newArrayList(new Column("k1", ScalarType.createVarcharType(10)));
        Range<PartitionKey> range =
                Range.range(PartitionKey.createPartitionKey(Lists.newArrayList(new PartitionValue("1")), columns),
                        BoundType.CLOSED,
                        PartitionKey.createPartitionKey(Lists.newArrayList(new PartitionValue("3")), columns),
                        BoundType.CLOSED);
        DataProperty dataProperty = new DataProperty(TStorageMedium.HDD);
        Partition partition = new Partition(1L, "pt", new MaterializedIndex(), null);
        bin.recyclePartition(new RecycleRangePartitionInfo(11L, 22L, partition, range, dataProperty, (short) 1, false, null));
        Partition partition2 = new Partition(2L, "pt", new MaterializedIndex(), null);
        bin.recyclePartition(new RecycleRangePartitionInfo(11L, 22L, partition2, range, dataProperty, (short) 1, false, null));

        Partition recycledPart = bin.getPartition(1L);
        Assert.assertNotNull(recycledPart);
        recycledPart = bin.getPartition(2L);
        Assert.assertEquals(2L, recycledPart.getId());
        Assert.assertEquals(range, bin.getPartitionRange(2L));
        Assert.assertEquals(dataProperty, bin.getPartitionDataProperty(2L));
        Assert.assertEquals((short) 1, bin.getPartitionReplicationNum(2L));
        Assert.assertFalse(bin.getPartitionIsInMemory(2L));
    }