@Test
public void testSet() throws Exception {

  BatchedFuture<Integer> future = BatchedFuture.create();
  Truth.assertThat(future.isDone()).isFalse();
  future.set(42);
  Truth.assertThat(future.get()).isEqualTo(42);
  Truth.assertThat(future.get(1, TimeUnit.HOURS)).isEqualTo(42);
  Truth.assertThat(future.isDone()).isTrue();
}