@Test
public void testOnePartitionPerTask() throws Exception {

    int totalTasks = 64;
    int partitionsPerTask = 1;
    List<ZkCoordinator> coordinatorList = buildCoordinators(totalTasks / partitionsPerTask);
    when(reader.getBrokerInfo()).thenReturn(TestUtils.buildPartitionInfo(totalTasks));
    for (ZkCoordinator coordinator : coordinatorList) {
        List<PartitionManager> myManagedPartitions = coordinator.getMyManagedPartitions();
        assertEquals(partitionsPerTask, myManagedPartitions.size());
        assertEquals(coordinator._taskIndex, myManagedPartitions.get(0).getPartition().partition);
    }
}