@Override
  public final Map<PCollection<?>, ReplacementOutput> mapOutputs(
      Map<TupleTag<?>, PCollection<?>> outputs, OutputT newOutput) {
    return ReplacementOutputs.singleton(outputs, newOutput);
  }
@Test
  public void testMapOutputsMultipleOriginalOutputsFails() {
    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));
    thrown.expect(IllegalArgumentException.class);
    factory.mapOutputs(
        PValues.expandOutput(PCollectionList.of(output).and(input).and(reappliedOutput)),
        reappliedOutput);
  }