QueryablePipeline { public static QueryablePipeline forTransforms( Collection<String> transformIds, Components components) { return new QueryablePipeline(transformIds, components); } private  QueryablePipeline(Collection<String> transformIds, Components components); static QueryablePipeline forPrimitivesIn(Components components); static QueryablePipeline forPipeline(RunnerApi.Pipeline p); static QueryablePipeline forTransforms(
      Collection<String> transformIds, Components components); Collection<PTransformNode> getTransforms(); Iterable<PTransformNode> getTopologicallyOrderedTransforms(); Set<PTransformNode> getRootTransforms(); PTransformNode getProducer(PCollectionNode pcollection); Set<PTransformNode> getPerElementConsumers(PCollectionNode pCollection); Set<PTransformNode> getSingletonConsumers(PCollectionNode pCollection); Set<PCollectionNode> getPerElementInputPCollections(PTransformNode ptransform); Set<PCollectionNode> getOutputPCollections(PTransformNode ptransform); Components getComponents(); Collection<SideInputReference> getSideInputs(PTransformNode transform); Collection<UserStateReference> getUserStates(PTransformNode transform); Collection<TimerReference> getTimers(PTransformNode transform); Optional<Environment> getEnvironment(PTransformNode parDo);  }
@Test public void forTransformsWithMalformedGraph() { Components components = Components.newBuilder() .putTransforms( "root", PTransform.newBuilder().putOutputs("output", "output.out").build()) .putPcollections( "output.out", RunnerApi.PCollection.newBuilder().setUniqueName("output.out").build()) .putTransforms( "consumer", PTransform.newBuilder().putInputs("input", "output.out").build()) .build(); thrown.expect(IllegalArgumentException.class); QueryablePipeline.forTransforms(ImmutableSet.of("consumer"), components); }