Partition getPartition(String name) {
        return partitions.get(name);
    }
@Test
    public void limitAllocatedToBins() {
        AbstractPartitionedLimiter<String> limiter = (AbstractPartitionedLimiter<String>) TestPartitionedLimiter.newBuilder()
                .partitionResolver(Function.identity())
                .partition("batch", 0.3)
                .partition("live", 0.7)
                .limit(FixedLimit.of(10))
                .build();

        Assert.assertEquals(3, limiter.getPartition("batch").getLimit());
        Assert.assertEquals(7, limiter.getPartition("live").getLimit());
    }