@Test public void removingFromQueue_noConcurrentModification() {

  Queue<String> queue = new ArrayDeque<>();
  queue.add("one");
  queue.add("two");
  assertThat(whileNotNull(queue::poll))
      .containsExactly("one", "two").inOrder();
  assertThat(queue).isEmpty();
}