@Test
public void testOneConsumerMultipleTopics() {

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