assertEquals(2, queue.size());
assertEquals(1, queue.remainingCapacity());
}
public void testNullPointerExceptions() {
NullPointerTester tester = new NullPointerTester();
tester.testAllPublicStaticMethods(EvictingQueue.class);
tester.testAllPublicConstructors(EvictingQueue.class);
EvictingQueue<String> queue = EvictingQueue.create(5);
// The queue must be non-empty so it throws a NPE correctly
queue.add("one");
tester.testAllPublicInstanceMethods(queue);
}