public static HL7v2Read readAllRequests() {
    return new HL7v2Read();
  }
@Test
  public void testHL7v2IOFailedReadsByParameter() {
    List<HL7v2ReadParameter> badReadParameters =
        Arrays.asList(
            HL7v2ReadParameter.of(
                "metadata-foo", "projects/a/locations/b/datasets/c/hl7V2Stores/d/messages/foo"),
            HL7v2ReadParameter.of(
                "metadata-bar", "projects/a/locations/b/datasets/c/hl7V2Stores/d/messages/bar"));

    PCollection<HL7v2ReadParameter> parameters = pipeline.apply(Create.of(badReadParameters));
    HL7v2IO.HL7v2Read.Result readResult = parameters.apply(HL7v2IO.readAllRequests());

    PCollection<HealthcareIOError<HL7v2ReadParameter>> failed = readResult.getFailedReads();

    PCollection<HL7v2ReadResponse> messages = readResult.getMessages();

    PCollection<HL7v2ReadParameter> failedParameters =
        failed.apply("Map to parameters", ParDo.of(new MapHealthCareIOErrorToReadParameter()));

    PAssert.that(failedParameters).containsInAnyOrder(badReadParameters);
    PAssert.that(messages).empty();
    pipeline.run();
  }