### Question:
CircularBlockingQueue implements BlockingQueue<E> { public CircularBlockingQueue(int queueSize) { this.queue = new ArrayDeque<>(queueSize); this.maxSize = queueSize; this.lock = new ReentrantLock(); this.notEmpty = this.lock.newCondition(); this.droppedCount = 0L; } CircularBlockingQueue(int queueSize); @Override boolean offer(E e); @Override E poll(long timeout, TimeUnit unit); @Override E take(); @Override boolean isEmpty(); @Override int size(); long getDroppedCount(); @Override int drainTo(Collection<? super E> c); @Override E poll(); @Override E element(); @Override E peek(); @Override E remove(); @Override boolean addAll(Collection<? extends E> arg0); @Override void clear(); @Override boolean containsAll(Collection<?> arg0); @Override Iterator<E> iterator(); @Override boolean removeAll(Collection<?> arg0); @Override boolean retainAll(Collection<?> arg0); @Override Object[] toArray(); @Override T[] toArray(T[] arg0); @Override boolean add(E e); @Override boolean contains(Object o); @Override int drainTo(Collection<? super E> c, int maxElements); @Override boolean offer(E e, long timeout, TimeUnit unit); @Override void put(E e); @Override int remainingCapacity(); @Override boolean remove(Object o);  }### Answer:
@Test public void testCircularBlockingQueue() throws InterruptedException { final CircularBlockingQueue<Integer> testQueue = new CircularBlockingQueue<>(2); testQueue.offer(1); testQueue.offer(2); testQueue.offer(3); assertEquals(2, testQueue.size()); assertEquals(2, testQueue.take().intValue()); assertEquals(3, testQueue.take().intValue()); assertEquals(1L, testQueue.getDroppedCount()); assertEquals(0, testQueue.size()); assertEquals(true, testQueue.isEmpty()); }