@Override
  public final Map<PCollection<?>, ReplacementOutput> mapOutputs(
      Map<TupleTag<?>, PCollection<?>> outputs, OutputT newOutput) {
    return ReplacementOutputs.singleton(outputs, newOutput);
  }
@Test
  public void testMapOutputs() {
    PCollection<Integer> input = pipeline.apply(Create.of(1, 2, 3));
    PCollection<Integer> output = input.apply("Map", MapElements.via(fn));
    PCollection<Integer> reappliedOutput = input.apply("ReMap", MapElements.via(fn));
    Map<PCollection<?>, ReplacementOutput> replacementMap =
        factory.mapOutputs(PValues.expandOutput(output), reappliedOutput);
    assertThat(
        replacementMap,
        Matchers.hasEntry(
            reappliedOutput,
            ReplacementOutput.of(
                TaggedPValue.ofExpandedValue(output),
                TaggedPValue.ofExpandedValue(reappliedOutput))));
  }