StepTransformResult implements TransformResult<InputT> { public static <InputT> Builder<InputT> withoutHold(AppliedPTransform<?, ?, ?> transform) { return new Builder(transform, BoundedWindow.TIMESTAMP_MAX_VALUE); }  static Builder<InputT> withHold(
      AppliedPTransform<?, ?, ?> transform, Instant watermarkHold); static Builder<InputT> withoutHold(AppliedPTransform<?, ?, ?> transform); @Override TransformResult<InputT> withLogicalMetricUpdates(MetricUpdates metricUpdates);  }
@Test public void producedBundlesProducedOutputs() { UncommittedBundle<Integer> bundle = bundleFactory.createBundle(pc); TransformResult<Integer> result = StepTransformResult.<Integer>withoutHold(transform).addOutput(bundle).build(); assertThat(result.getOutputBundles(), containsInAnyOrder(bundle)); }
@Test public void withAdditionalOutputProducedOutputs() { TransformResult<Integer> result = StepTransformResult.<Integer>withoutHold(transform) .withAdditionalOutput(OutputType.PCOLLECTION_VIEW) .build(); assertThat(result.getOutputTypes(), containsInAnyOrder(OutputType.PCOLLECTION_VIEW)); }
@Test public void producedBundlesAndAdditionalOutputProducedOutputs() { TransformResult<Integer> result = StepTransformResult.<Integer>withoutHold(transform) .addOutput(bundleFactory.createBundle(pc)) .withAdditionalOutput(OutputType.PCOLLECTION_VIEW) .build(); assertThat(result.getOutputTypes(), hasItem(OutputType.PCOLLECTION_VIEW)); }
@Test public void noBundlesNoAdditionalOutputProducedOutputsFalse() { TransformResult<Integer> result = StepTransformResult.<Integer>withoutHold(transform).build(); assertThat(result.getOutputTypes(), emptyIterable()); }