@Override
  public PTransformReplacement<PCollectionList<T>, PCollection<T>> getReplacementTransform(
      AppliedPTransform<PCollectionList<T>, PCollection<T>, PCollections<T>> transform) {
    checkArgument(
        transform.getInputs().isEmpty(),
        "Unexpected nonempty input %s for %s",
        transform.getInputs(),
        getClass().getSimpleName());
    return PTransformReplacement.of(
        PCollectionList.empty(transform.getPipeline()), new CreateEmptyFromList<T>());
  }
@Test
  @Category(NeedsRunner.class)
  public void testOverride() {
    PCollectionList<Long> empty = PCollectionList.empty(pipeline);
    PCollection<Long> emptyFlattened =
        empty.apply(
            factory
                .getReplacementTransform(
                    AppliedPTransform.of(
                        "nonEmptyInput",
                        Collections.emptyMap(),
                        Collections.emptyMap(),
                        Flatten.pCollections(),
                        ResourceHints.create(),
                        pipeline))
                .getTransform());
    PAssert.that(emptyFlattened).empty();
    pipeline.run();
  }