public static QueryablePipeline forTransforms(
      Collection<String> transformIds, Components components) {
    return new QueryablePipeline(transformIds, components);
  }
@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);
    // Consumer consumes a PCollection which isn't produced.
    QueryablePipeline.forTransforms(ImmutableSet.of("consumer"), components);
  }