@Override
    public int partition(int total, T data) {
        return (int) Thread.currentThread().getId() % total;
    }
@Test
    public void testPartition() {
        int partitionNum = (int) Thread.currentThread().getId() % 10;
        ProducerThreadPartitioner<SampleData> partitioner = new ProducerThreadPartitioner<SampleData>();
        assertEquals(partitioner.partition(10, new SampleData()), partitionNum);
        assertEquals(partitioner.partition(10, new SampleData()), partitionNum);
        assertEquals(partitioner.partition(10, new SampleData()), partitionNum);
    }