public static <P> Builder<P> newBuilder() {
    return new Builder<P>();
  }
@Test void putAllRules() {
    Matcher<Void> one = v -> false;
    Matcher<Void> two = v -> true;
    Matcher<Void> three = v -> Boolean.FALSE;
    Matcher<Void> four = v -> Boolean.TRUE;
    ParameterizedSampler<Void> base = ParameterizedSampler.<Void>newBuilder()
      .putRule(one, Sampler.ALWAYS_SAMPLE)
      .putRule(two, Sampler.NEVER_SAMPLE)
      .putRule(three, Sampler.ALWAYS_SAMPLE)
      .build();

    ParameterizedSampler<Void> extended = ParameterizedSampler.<Void>newBuilder()
      .putAllRules(base)
      .putRule(one, Sampler.NEVER_SAMPLE)
      .putRule(four, Sampler.ALWAYS_SAMPLE)
      .build();

    assertThat(extended).usingRecursiveComparison()
      .isEqualTo(ParameterizedSampler.<Void>newBuilder()
        .putRule(one, Sampler.NEVER_SAMPLE)
        .putRule(two, Sampler.NEVER_SAMPLE)
        .putRule(three, Sampler.ALWAYS_SAMPLE)
        .putRule(four, Sampler.ALWAYS_SAMPLE)
        .build()
      );
  }