public static Map<PCollection<?>, ReplacementOutput> singleton(
      Map<TupleTag<?>, PCollection<?>> original, POutput replacement) {
    Entry<TupleTag<?>, PCollection<?>> originalElement =
        Iterables.getOnlyElement(original.entrySet());
    Entry<TupleTag<?>, PCollection<?>> replacementElement =
        Iterables.getOnlyElement(PValues.expandOutput(replacement).entrySet());
    return Collections.singletonMap(
        replacementElement.getValue(),
        ReplacementOutput.of(
            TaggedPValue.of(originalElement.getKey(), originalElement.getValue()),
            TaggedPValue.of(replacementElement.getKey(), replacementElement.getValue())));
  }
@Test
  public void singletonMultipleOriginalsThrows() {
    thrown.expect(IllegalArgumentException.class);
    ReplacementOutputs.singleton(
        ImmutableMap.<TupleTag<?>, PCollection<?>>builder()
            .putAll(PValues.expandValue(ints))
            .putAll(PValues.fullyExpand(moreInts.expand()))
            .build(),
        replacementInts);
  }