HL7v2IO { public static Read getAll() { return new Read(); }  static Read getAll(); static ListHL7v2Messages readAll(List<String> hl7v2Stores); static ListHL7v2Messages readAll(ValueProvider<List<String>> hl7v2Stores); static ListHL7v2Messages read(String hl7v2Store); static ListHL7v2Messages read(ValueProvider<String> hl7v2Store); static ListHL7v2Messages readWithFilter(String hl7v2Store, String filter); static ListHL7v2Messages readWithFilter(
      ValueProvider<String> hl7v2Store, ValueProvider<String> filter); static ListHL7v2Messages readAllWithFilter(List<String> hl7v2Stores, String filter); static ListHL7v2Messages readAllWithFilter(
      ValueProvider<List<String>> hl7v2Stores, ValueProvider<String> filter); static Write ingestMessages(String hl7v2Store);  }
@Test public void test_HL7v2IO_failedReads() { 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(); }