### Question:
FHIRExtractors { public static String getProviderNPI(Practitioner provider) { return findMatchingIdentifier(provider.getIdentifier(), DPCIdentifierSystem.NPPES).getValue(); } private  FHIRExtractors(); static String getProviderNPI(Practitioner provider); static String getPatientMBI(Patient patient); static String getPatientBeneId(Patient patient); static UUID getEntityUUID(String idString); static Provenance.ProvenanceAgentComponent getProvenancePerformer(Provenance provenance); static Identifier parseIDFromQueryParam(String queryParam); static Pair<String, String> parseTag(String tag); static Identifier findMatchingIdentifier(List<Identifier> identifiers, DPCIdentifierSystem system); static String getOrganizationID(IBaseResource resource); static String getAttributedNPI(Group group);  }### Answer:
@Test void testPractitionerMultipleIDs() { final Practitioner practitioner = new Practitioner(); practitioner.addIdentifier().setSystem(DPCIdentifierSystem.DPC.getSystem()).setValue("test-dpc-one"); practitioner.addIdentifier().setSystem(DPCIdentifierSystem.fromString(DPCIdentifierSystem.NPPES.getSystem()).getSystem()).setValue("test-npi-one"); assertEquals("test-npi-one", getProviderNPI(practitioner), "Should have NPI"); }
@Test void testPractitionerNoID() { final Practitioner practitioner = new Practitioner(); final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> getProviderNPI(practitioner), "Should not have NPI"); assertEquals(String.format(MISSING_ID_FMT, DPCIdentifierSystem.NPPES.getSystem()), exception.getMessage(), "Should have correct error message"); }