@Test
public void typical() throws Exception {

  TopicPartitionInfo tpi = new TopicPartitionInfo(0, node0, singletonList(node0), singletonList(node0));
  KafkaFuture<Map<String, TopicDescription>> kafkaFuture = topicDescriptionFuture(tpi);
  doReturn(describeTopicsResult).when(adminClient).describeTopics(topics);
  doReturn(kafkaFuture).when(describeTopicsResult).all();
  Map<TopicPartition, LeaderInSync> result = underTest.apply(0, topics);
  assertThat(result.size(), is(1));
  LeaderInSync leaderInSync = result.get(new TopicPartition(topic, 0));
  assertThat(leaderInSync.isLeader(), is(true));
  assertThat(leaderInSync.isInSync(), is(true));
}