public static Builder withMaximumNumberOfInsertionsForOptimalBloomFilter(
      long maximumBloomFilterInsertionsForOptimalBloomFilter) {
    checkArgument(
        maximumBloomFilterInsertionsForOptimalBloomFilter > 0,
        "Expected Bloom filter insertion limit to be positive.");
    checkArgument(
        maximumBloomFilterInsertionsForOptimalBloomFilter <= MAX_ELEMENTS,
        "The specified size is larger than the maximum supported size of 2^63 elements.");

    return new Builder(maximumBloomFilterInsertionsForOptimalBloomFilter);
  }
@Test
  public void testScalableBloomFilterCoder() throws Exception {
    ScalableBloomFilter.Builder builderA =
        ScalableBloomFilter.withMaximumNumberOfInsertionsForOptimalBloomFilter(16);
    builderA.put(BUFFER);
    ScalableBloomFilter filterA = builderA.build();
    ScalableBloomFilter.Builder builderB =
        ScalableBloomFilter.withMaximumNumberOfInsertionsForOptimalBloomFilter(16);
    builderB.put(BUFFER);
    ScalableBloomFilter filterB = builderB.build();

    CoderProperties.coderDecodeEncodeEqual(ScalableBloomFilterCoder.of(), filterA);
    CoderProperties.coderDeterministic(ScalableBloomFilterCoder.of(), filterA, filterB);
    CoderProperties.coderConsistentWithEquals(ScalableBloomFilterCoder.of(), filterA, filterB);
    CoderProperties.coderSerializable(ScalableBloomFilterCoder.of());
    CoderProperties.structuralValueConsistentWithEquals(
        ScalableBloomFilterCoder.of(), filterA, filterB);
  }