@Test
public void testWhenBatcherIsClose() throws Exception {

  Future<Integer> result;
  try (Batcher<Integer, Integer> batcher =
      new BatcherImpl<>(
          SQUARER_BATCHING_DESC_V2,
          callLabeledIntSquarer,
          labeledIntList,
          batchingSettings,
          EXECUTOR)) {
    result = batcher.add(5);
  }
  assertThat(result.isDone()).isTrue();
  assertThat(result.get()).isEqualTo(25);
}