public static Collection<PValue> nonAdditionalInputs(AppliedPTransform<?, ?, ?> application) {
    ImmutableList.Builder<PValue> mainInputs = ImmutableList.builder();
    PTransform<?, ?> transform = application.getTransform();
    for (Map.Entry<TupleTag<?>, PCollection<?>> input : application.getInputs().entrySet()) {
      if (!transform.getAdditionalInputs().containsKey(input.getKey())) {
        mainInputs.add(input.getValue());
      }
    }
    checkArgument(
        !mainInputs.build().isEmpty() || application.getInputs().isEmpty(),
        "Expected at least one main input if any inputs exist");
    return mainInputs.build();
  }
@Test
  public void nonAdditionalInputsWithNoInputSucceeds() {
    AppliedPTransform<PInput, POutput, TestTransform> transform =
        AppliedPTransform.of(
            "input-free",
            Collections.emptyMap(),
            Collections.emptyMap(),
            new TestTransform(),
            ResourceHints.create(),
            pipeline);

    assertThat(TransformInputs.nonAdditionalInputs(transform), Matchers.empty());
  }