@Test public void whileNotNull_notNull() {

  Deque<String> stack = new ArrayDeque<>();
  stack.push("one");
  stack.push("two");
  assertThat(whileNotNull(stack::poll))
      .containsExactly("two", "one").inOrder();
}