public static <T> PCollection<T> getSingletonMainInput(
      AppliedPTransform<? extends PCollection<? extends T>, ?, ?> application) {
    return getSingletonMainInput(
        application.getInputs(), application.getTransform().getAdditionalInputs().keySet());
  }
@Test
  public void getMainInputSingleOutputSingleInput() {
    AppliedPTransform<PCollection<Long>, ?, ?> application =
        AppliedPTransform.of(
            "application",
            Collections.singletonMap(new TupleTag<Long>(), mainInput),
            Collections.singletonMap(new TupleTag<Long>(), output),
            ParDo.of(new TestDoFn()),
            ResourceHints.create(),
            pipeline);
    PCollection<Long> input = PTransformReplacements.getSingletonMainInput(application);
    assertThat(input, equalTo(mainInput));
  }