@Test
public void testTrySetResult() {

  TaskCompletionSource<String> tcs = new TaskCompletionSource<>();
  Task<String> task = tcs.getTask();
  assertFalse(task.isCompleted());
  boolean success = tcs.trySetResult("SHOW ME WHAT YOU GOT");
  assertTrue(success);
  assertTrue(task.isCompleted());
  assertEquals("SHOW ME WHAT YOU GOT", task.getResult());
}