SketchFrequencies { public static <K, V> PerKeySketch<K, V> perKey() { return PerKeySketch.<K, V>builder().build(); }  static GlobalSketch<InputT> globally(); static PerKeySketch<K, V> perKey();  }
@Test public void perKeyDefault() { PCollection<Long> stream = tp.apply(Create.of(smallStream)); PCollection<Sketch<Long>> sketch = stream.apply(WithKeys.of(1)).apply(SketchFrequencies.perKey()).apply(Values.create()); Coder<Long> coder = stream.getCoder(); PAssert.thatSingleton("Verify number of hits", sketch) .satisfies(new VerifyStreamFrequencies<>(coder, distinctElems, frequencies)); tp.run(); }