@Test
public void typical() throws Exception {

  TopicPartition topicPartition = new TopicPartition("topic", 0);
  File folder = temp.newFolder(topicPartition.toString());
  wrap(new byte[] { 0 }).copyTo(asByteSink(new File(folder, "data")));
  Map<TopicPartition, Replica> partitionsAndLogDir = singletonMap(topicPartition,
      new Replica(temp.getRoot().getAbsolutePath(), 0L));
  Map<TopicPartition, Long> result = underTest.apply(partitionsAndLogDir);
  assertThat(result.size(), is(1));
  long size = result.get(topicPartition);
  assertThat(size, is(1L));
}