@Test(dependsOnMethods = "emptyStack") public void getAndRemoveFirst() { Object objectOne = mock(Object.class); Object objectTwo = mock(Object.class); Object objectThree = mock(Object.class); threadLocalStack.push(objectOne); threadLocalStack.push(objectTwo); threadLocalStack.push(objectThree); assertThat(threadLocalStack.getAndRemoveFirst(), is(objectOne)); assertThat(threadLocalStack.getAndRemoveFirst(), is(objectTwo)); assertThat(threadLocalStack.getAndRemoveFirst(), is(objectThree)); verifyZeroInteractions(objectOne); verifyZeroInteractions(objectTwo); verifyZeroInteractions(objectThree); }
public E getAndRemoveFirst() { return super.get().removeFirst(); }
ThreadLocalStack extends ThreadLocal<LinkedList<E>> { public E getAndRemoveFirst() { return super.get().removeFirst(); } }
ThreadLocalStack extends ThreadLocal<LinkedList<E>> { public E getAndRemoveFirst() { return super.get().removeFirst(); }  }
ThreadLocalStack extends ThreadLocal<LinkedList<E>> { public E getAndRemoveFirst() { return super.get().removeFirst(); }  @Override LinkedList<E> initialValue(); void push(E value); E pop(); E getLast(); E getAndRemoveFirst(); }
ThreadLocalStack extends ThreadLocal<LinkedList<E>> { public E getAndRemoveFirst() { return super.get().removeFirst(); }  @Override LinkedList<E> initialValue(); void push(E value); E pop(); E getLast(); E getAndRemoveFirst();  }