AuditDataTransformHelper { public static String findSingleExternalIdentifierAndExtractValue(final List<ExternalIdentifierType> olExtId, final String sIdentScheme) { String sValue = null; final ExternalIdentifierType oExtId = findSingleExternalIdentifier(olExtId, sIdentScheme); if (oExtId != null && oExtId.getValue() != null) { sValue = oExtId.getValue(); } return sValue; }  static EventIdentificationType createEventIdentification(final String actionCode, final Integer eventOutcome,
        final CodedValueType eventId); static CodedValueType createEventId(final String eventCode, final String eventCodeSys,
        final String eventCodeSysName, final String dispName); static CodedValueType createCodeValueType(final String code, final String codeSys, final String codeSysName,
        final String dispName); static AuditMessageType.ActiveParticipant createActiveParticipantFromUser(final UserType userInfo,
        final Boolean userIsReq); static AuditMessageType.ActiveParticipant createActiveParticipant(final String userId,
        final String altUserId, final String userName, final Boolean userIsReq); static AuditSourceIdentificationType createAuditSourceIdentificationFromUser(final UserType userInfo); static AuditSourceIdentificationType createAuditSourceIdentification(final String communityId,
        final String communityName); static ParticipantObjectIdentificationType createParticipantObjectIdentification(final String patientId); static ParticipantObjectIdentificationType createDocumentParticipantObjectIdentification(
        final String documentId); static void logAuditMessage(final AuditMessageType message); static ExternalIdentifierType findSingleExternalIdentifier(final List<ExternalIdentifierType> olExtId,
        final String sIdentScheme); static String findSingleExternalIdentifierAndExtractValue(final List<ExternalIdentifierType> olExtId,
        final String sIdentScheme); static String createCompositePatientId(final String assigningAuthId, final String patientId); static String createCompositePatientIdFromAssertion(final UserType userInfo, final String patientId);  }
@Test public void testFindSingleExternalIdentifierAndExtractValue() { ExternalIdentifierType extId1 = new ExternalIdentifierType(); extId1.setIdentificationScheme("2.16.840.1.113883.3.198"); extId1.setValue("198"); ExternalIdentifierType extId2 = new ExternalIdentifierType(); extId2.setIdentificationScheme("2.16.840.1.113883.3.200"); extId2.setValue("200"); List<ExternalIdentifierType> olExtId = new ArrayList(); olExtId.add(extId1); olExtId.add(extId2); String sIdentScheme = "2.16.840.1.113883.3.198"; String expResult = extId1.getValue(); String result = AuditDataTransformHelper.findSingleExternalIdentifierAndExtractValue(olExtId, sIdentScheme); assertEquals(expResult, result); }