code: public E insert(E element) {
          E evicted = null;
          if (size() >= capacity) {
              if (evictPolicy == EvictPolicy.REJECT_NEW) {
                  // reject the new element
                  return element;
              }
              // Evict first, so we do not need to resize
              evicted = evict();
          }
          deque.offerLast(element);
          return evicted;
      }
docs: Inserts an element into the deque, and returns the one that had to be evicted in case of a capacity violation.
  
  @param element
  the element to insert
  
  @return the evicted element, {@code null} if the maximum capacity has not been reached