CountByKey extends ShuffleOperator<InputT, KeyT, KV<KeyT, Long>> implements CompositeOperator<InputT, KV<KeyT, Long>> { public static <InputT> KeyByBuilder<InputT> of(PCollection<InputT> input) { return new Builder<>(null).of(input); } private  CountByKey(
      @Nullable String name,
      UnaryFunction<InputT, KeyT> keyExtractor,
      @Nullable TypeDescriptor<KeyT> keyType,
      @Nullable Window<InputT> window,
      TypeDescriptor<KV<KeyT, Long>> outputType); static KeyByBuilder<InputT> of(PCollection<InputT> input); static OfBuilder named(@Nullable String name); @Override PCollection<KV<KeyT, Long>> expand(PCollectionList<InputT> inputs);  }
@Test public void testBuild_ImplicitName() { final PCollection<String> dataset = TestUtils.createMockDataset(TypeDescriptors.strings()); final PCollection<KV<String, Long>> counted = CountByKey.of(dataset).keyBy(s -> s).output(); final CountByKey count = (CountByKey) TestUtils.getProducer(counted); assertFalse(count.getName().isPresent()); }