code: private void evict(Node candidate) {
      // if (|T1| ≥ 1) and ((x ∈ B2 and |T1| = p) or (|T1| > p))
      //   then move the LRU page of T1 to the top of B1 and remove it from the cache.
      // else move the LRU page in T2 to the top of B2 and remove it from the cache.
  
      if ((sizeT1 >= 1) && (((candidate.type == QueueType.B2) && (sizeT1 == p)) || (sizeT1 > p))) {
        Node victim = headT1.next;
        victim.remove();
        victim.type = QueueType.B1;
        victim.appendToTail(headB1);
        sizeT1--;
        sizeB1++;
      } else {
        Node victim = headT2.next;
        victim.remove();
        victim.type = QueueType.B2;
        victim.appendToTail(headB2);
        sizeT2--;
        sizeB2++;
      }
      policyStats.recordEviction();
    }
docs: Evicts while the map exceeds the maximum capacity.