public static Read getAll() {
    return new Read();
  }
@Test
  public void testHL7v2IOFailedReads() {
    List<String> badMessageIDs =
        Arrays.asList(
            "projects/a/locations/b/datasets/c/hl7V2Stores/d/messages/foo",
            "projects/a/locations/b/datasets/c/hl7V2Stores/d/messages/bar");
    HL7v2IO.Read.Result readResult =
        pipeline.apply(Create.of(badMessageIDs)).apply(HL7v2IO.getAll());

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

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

    PCollection<String> failedMsgIds =
        failed.apply(
            MapElements.into(TypeDescriptors.strings()).via(HealthcareIOError::getDataResource));

    PAssert.that(failedMsgIds).containsInAnyOrder(badMessageIDs);
    PAssert.that(messages).empty();
    pipeline.run();
  }