code: @Override
      protected EvictionChecker createCacheEvictionChecker(int size, MaxSizePolicy maxSizePolicy) {
          if (maxSizePolicy == null) {
              throw new IllegalArgumentException("Max-Size policy cannot be null");
          }
  
          if (maxSizePolicy != MaxSizePolicy.ENTRY_COUNT) {
              throw new IllegalArgumentException("Invalid max-size policy "
                      + '(' + maxSizePolicy + ") for " + getClass().getName() + "! Only "
                      + MaxSizePolicy.ENTRY_COUNT + " is supported.");
          } else {
              return super.createCacheEvictionChecker(size, maxSizePolicy);
          }
      }
docs: Creates an instance for checking if the maximum cache size has been reached. Supports only the
  {@link MaxSizePolicy#ENTRY_COUNT} policy. Throws an {@link IllegalArgumentException} if other {@code maxSizePolicy} is
  used.
  
  @param size          the maximum number of entries
  @param maxSizePolicy the way in which the size is interpreted, only the {@link MaxSizePolicy#ENTRY_COUNT}
  {@code maxSizePolicy} is supported.
  @return the instance which will check if the maximum number of entries has been reached
  @throws IllegalArgumentException if the policy is not {@link MaxSizePolicy#ENTRY_COUNT} or if the {@code maxSizePolicy}
  is null