@Test
public void testOneConsumerOneTopic() {

    String topic = "topic";
    String consumerId = "consumer";
    Map<String, Integer> partitionsPerTopic = new HashMap<>();
    partitionsPerTopic.put(topic, 3);
    Map<String, List<TopicPartition>> assignment = assignor.assign(partitionsPerTopic,
            Collections.singletonMap(consumerId, Arrays.asList(topic)));
    assertEquals(Collections.singleton(consumerId), assignment.keySet());
    assertAssignment(Arrays.asList(
            new TopicPartition(topic, 0),
            new TopicPartition(topic, 1),
            new TopicPartition(topic, 2)), assignment.get(consumerId));
}