Reported in https://github.com/google/guava/issues/3086#issuecomment-378523615

Needs a fix like https://github.com/google/guava/commit/8f22dbc8ea0c1abdf044846057f6df8201ee9961
@Override
    public int weigh(Object key, Object value) {
      return 1;
    }
  }
  static final Ticker NULL_TICKER =
      new Ticker() {
        @Override
        public long read() {
          return 0;
        }
      };
  private static final Logger logger = Logger.getLogger(CacheBuilder.class.getName());
  static final int UNSET_INT = -1;
  boolean strictParsing = true;
  int initialCapacity = UNSET_INT;
  int concurrencyLevel = UNSET_INT;
  long maximumSize = UNSET_INT;
  long maximumWeight = UNSET_INT;
  @MonotonicNonNullDecl Weigher<? super K, ? super V> weigher;
  @MonotonicNonNullDecl Strength keyStrength;
  @MonotonicNonNullDecl Strength valueStrength;
  long expireAfterWriteNanos = UNSET_INT;
  long expireAfterAccessNanos = UNSET_INT;
  long refreshNanos = UNSET_INT;
  @MonotonicNonNullDecl Equivalence<Object> keyEquivalence;
  @MonotonicNonNullDecl Equivalence<Object> valueEquivalence;
  @MonotonicNonNullDecl RemovalListener<? super K, ? super V> removalListener;
  @MonotonicNonNullDecl Ticker ticker;
  Supplier<? extends StatsCounter> statsCounterSupplier = NULL_STATS_COUNTER;