@Test
public void testTwoConsumersOneTopicOnePartition() {

    String topic = "topic";
    String consumer1 = "consumer1";
    String consumer2 = "consumer2";
    Map<String, Integer> partitionsPerTopic = new HashMap<>();
    partitionsPerTopic.put(topic, 1);
    Map<String, List<String>> consumers = new HashMap<>();
    consumers.put(consumer1, Arrays.asList(topic));
    consumers.put(consumer2, Arrays.asList(topic));
    Map<String, List<TopicPartition>> assignment = assignor.assign(partitionsPerTopic, consumers);
    assertAssignment(Arrays.asList(new TopicPartition(topic, 0)), assignment.get(consumer1));
    assertAssignment(Collections.<TopicPartition>emptyList(), assignment.get(consumer2));
}