@Override
  public Map<PCollection<?>, ReplacementOutput> mapOutputs(
      Map<TupleTag<?>, PCollection<?>> outputs, PCollection<T> newOutput) {
    return ReplacementOutputs.singleton(outputs, newOutput);
  }
@Test
  public void mapOutputsSucceeds() {
    PCollection<Long> original = pipeline.apply("Original", GenerateSequence.from(0));
    PCollection<Long> replacement = pipeline.apply("Replacement", GenerateSequence.from(0));
    Map<PCollection<?>, ReplacementOutput> mapping =
        factory.mapOutputs(PValues.expandOutput(original), replacement);

    assertThat(
        mapping,
        Matchers.hasEntry(
            replacement,
            ReplacementOutput.of(
                TaggedPValue.ofExpandedValue(original),
                TaggedPValue.ofExpandedValue(replacement))));
  }