@Override
  public Coder<AccumT> getAccumulatorCoder(CoderRegistry registry, Coder<InputT> inputCoder)
      throws CannotProvideCoderException {
    // Infer coder based on underlying AggregateFn instance.
    return registry.getCoder(
        getAggregateFn().getClass(),
        AggregateFn.class,
        ImmutableMap.<Type, Coder<?>>of(getInputTVariable(), inputCoder),
        getAccumTVariable());
  }
@Test
  public void getAccumulatorCoderInfersCoderForWildcardTypeParameter()
      throws CannotProvideCoderException {
    LazyAggregateCombineFn<Long, ?, ?> combiner = new LazyAggregateCombineFn<>(new Sum());
    Coder<?> coder = combiner.getAccumulatorCoder(CoderRegistry.createDefault(), VarLongCoder.of());
    assertThat(coder, instanceOf(VarLongCoder.class));
  }