PipelineTranslation { public static RunnerApi.Pipeline toProto(Pipeline pipeline) { return toProto(pipeline, SdkComponents.create(pipeline.getOptions())); }  static RunnerApi.Pipeline toProto(Pipeline pipeline); static RunnerApi.Pipeline toProto(Pipeline pipeline, boolean useDeprecatedViewTransforms); static RunnerApi.Pipeline toProto(Pipeline pipeline, SdkComponents components); static RunnerApi.Pipeline toProto(
      final Pipeline pipeline,
      final SdkComponents components,
      boolean useDeprecatedViewTransforms);  }
@Test public void testProtoDirectly() { final RunnerApi.Pipeline pipelineProto = PipelineTranslation.toProto(pipeline, false); pipeline.traverseTopologically( new PipelineProtoVerificationVisitor(pipelineProto, pipeline.getCoderRegistry(), false)); }
@Test public void testProtoDirectlyWithViewTransform() { final RunnerApi.Pipeline pipelineProto = PipelineTranslation.toProto(pipeline, true); pipeline.traverseTopologically( new PipelineProtoVerificationVisitor(pipelineProto, pipeline.getCoderRegistry(), true)); }
@Test public void testRequirements() { Pipeline pipeline = Pipeline.create(); pipeline.apply(Create.of(1, 2, 3)).apply(ParDo.of(new DoFnRequiringStableInput())); RunnerApi.Pipeline pipelineProto = PipelineTranslation.toProto(pipeline, false); assertThat( pipelineProto.getRequirementsList(), hasItem(ParDoTranslation.REQUIRES_STABLE_INPUT_URN)); }
@Test public void testProtoDirectly() { final RunnerApi.Pipeline pipelineProto = PipelineTranslation.toProto(pipeline, false); pipeline.traverseTopologically(new PipelineProtoVerificationVisitor(pipelineProto, false)); }
@Test public void testProtoDirectlyWithViewTransform() { final RunnerApi.Pipeline pipelineProto = PipelineTranslation.toProto(pipeline, true); pipeline.traverseTopologically(new PipelineProtoVerificationVisitor(pipelineProto, true)); }