/* ĠCopyright Ġ 2 0 2 1 ĠBetter ĠLtd Ġ( www . better . care ) Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġcare . better . platform . web . template . converter Ċ Ċ import Ġcare . better . platform . path . Name And Node Matching Path Value Extractor Ċ import Ġcare . better . platform . web . template . Web Template Ċ import Ġcare . better . platform . web . template . ab straction . Abstract Web Template Test Ċ import Ġcare . better . platform . web . template . converter . raw . context . Conversion Context Ċ import Ġcom . fasterxml . jackson . core . type . Type Reference Ċ import Ġcom . fasterxml . jackson . databind . JsonNode Ċ import Ġcom . fasterxml . jackson . databind . node . Object Node Ċ import Ġcom . google . common . collect . ImmutableList Ċ import Ġcom . google . common . collect . Immutable Map Ċ import Ġcare . better . platform . web . template . builder . context . Web Template Builder Context Ċ import Ġcare . better . platform . web . template . builder . Web Template Builder Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . assertj . core . api . Assertions . entry Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . open e hr . rm . common . Feed er Audit Ċ import Ġorg . open e hr . rm . common . Loc atable Ċ import Ġorg . open e hr . rm . composition . Composition Ċ import Ġorg . open e hr . rm . composition . Observation Ċ import Ġorg . open e hr . rm . composition . Section Ċ import Ġorg . open e hr . rm . datat ypes . Dv Mult imedia Ċ import Ġorg . open e hr . rm . datat ypes . Dv Par s able Ċ import Ġjava . io . IOException Ċ import Ġjavax . xml . bind . JAXB Exception Ċ Ċ /** Ċ Ġ* Ġ@ author ĠPri moz ĠDe lop st Ċ Ġ* Ġ@ since Ġ 3 . 1 . 0 Ċ Ġ*/ Ċ class ĠFeed er Audit Test Ġ: ĠAbstract Web Template Test () Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġweb Template : ĠWeb Template Ġ= ĠWeb Template Builder . build NonNull ( ĊĠĠĠĠĠĠĠ Ġget Template ("/ convert / templates / older / Demo ĠV it als . xml "), ĊĠĠĠĠĠĠĠ ĠWeb Template Builder Context (" en ", ĠImmutableList . of (" en ", Ġ" sl "))) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Wt To Composition () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposition Ġ= Ġbuild Composition () ĊĠĠĠĠĠĠĠ Ġvalidate Feed er Audit ( composition ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Wt To Composition Deep () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposition Ġ= Ġbuild Deep Composition () ĊĠĠĠĠĠĠĠ ĠassertThat ( composition ). isNotNull ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Wt To Composition Mult imedia () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposition Ġ= Ġbuild Composition With Multi Media () ĊĠĠĠĠĠĠĠ ĠassertThat ( composition ). isNotNull ĊĊĠĠĠĠĠĠĠ Ġval Ġfeed er Audit Ġ= Ġget Feed er Audit ( composition ) ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit !!. original Content ). isInstanceOf ( Dv Mult imedia :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġval Ġoriginal Content Ġ= Ġfeed er Audit . original Content Ġas ĠD v Mult imedia ? ĊĠĠĠĠĠĠĠ ĠassertThat ( original Content !!. media Type !!. code String ). isEqualTo (" text / html ") ĊĠĠĠĠĠĠĠ ĠassertThat ( original Content . uri !!. value ). isEqualTo (" http :// www . mar and . com ") ĊĊĠĠĠĠĠĠĠ Ġval Ġflat Map : ĠMap < String , ĠString ?> Ġ= Ġweb Template . convert Formatted From Raw To Flat ( composition , ĠFrom Raw Conversion . create ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( flatMap ). contains ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content _ mult imedia ", Ġ" http :// www . mar and . com "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content _ mult imedia | medi atype ", Ġ" text / html ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Composition To Wt Deep () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposition Ġ= Ġbuild Deep Composition () ĊĠĠĠĠĠĠĠ ĠassertThat ( composition ). isNotNull ĊĊĠĠĠĠĠĠĠ Ġval Ġflat Map : ĠMap < String , ĠString ?> Ġ= Ġweb Template . convert Formatted From Raw To Flat ( composition , ĠFrom Raw Conversion . create ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( flatMap ). contains ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id ", Ġ" 1 2 3 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | name ", Ġ" Testing ĠDoctor "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id _ scheme ", Ġ" seq "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id _ namespace ", Ġ" k zz "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | time ", Ġ" 2 0 1 7 - 0 1 - 3 1 T 0 0 : 0 0 : 0 0 Z ") ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Composition To Wt () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcomposition Ġ= Ġbuild Composition () ĊĠĠĠĠĠĠĠ Ġval Ġflat Map : ĠMap < String , ĠString ?> Ġ= Ġweb Template . convert Formatted From Raw To Flat ( composition , ĠFrom Raw Conversion . create ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( flatMap ). contains ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content ", Ġ" Hello Ġworld ! "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content | form al ism ", Ġ" text / plain "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | assign er ", Ġ" assign er 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | issuer ", Ġ" issuer 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 ", Ġ" id 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | type ", Ġ" PERSON "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | assign er ", Ġ" assign er 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | issuer ", Ġ" issuer 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 ", Ġ" id 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | type ", Ġ" PERSON "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | assign er ", Ġ" assign er 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | issuer ", Ġ" issuer 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 ", Ġ" id 1 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | type ", Ġ" PERSON "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | assign er ", Ġ" assign er 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | issuer ", Ġ" issuer 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 ", Ġ" id 2 "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | type ", Ġ" PERSON "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | system _ id ", Ġ" orig "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | version _ id ", Ġ" vv v ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Throws ( IOException :: class ) ĊĠĠĠ Ġfun Ġtest Structured With Feed er Audit () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Node Ġ= Ġget ObjectMapper (). read Tree ( get Json ("/ convert / composition s / Demo V it als Composition Feed er Audit . json ")) Ġas ĠObject Node ĊĊĠĠĠĠĠĠĠ Ġval Ġcomposition : ĠComp osition ? Ġ= Ġweb Template . convert From Structured To Raw ( json Node , ĠConversion Context . create (). build ()) ĊĊĠĠĠĠĠĠĠ Ġval Ġflat Map : ĠMap < String , ĠString ?> Ġ= Ġweb Template . convert Formatted From Raw To Flat ( composition !! , ĠFrom Raw Conversion . create ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( flatMap ). contains ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als /_ feed er _ audit / original _ content ", Ġ"{\" hello \": Ġ\" world \" } "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als /_ feed er _ audit / original _ content | form al ism ", Ġ" application / json "), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġentry (" vit als /_ feed er _ audit / origin ating _ system _ audit | system _ id ", Ġ" mine ") ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Throws ( IOException :: class ) ĊĠĠĠ Ġfun Ġtest Structured With Generic Fields () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġjson Node Ġ= Ġget ObjectMapper (). read Tree ( get Json ("/ convert / composition s / Demo V it als Composition Generic Fields . json ")) Ġas ĠObject Node ĊĊĠĠĠĠĠĠĠ Ġval Ġcomposition : ĠComp osition ? Ġ= Ġweb Template . convert From Structured To Raw ( json Node , ĠConversion Context . create (). build ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( composition !!. feed er Audit ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( composition . feed er Audit !!. origin ating System Audit ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( composition . feed er Audit !!. origin ating System Audit !!. system Id ). isEqualTo (" Form Renderer ") ĊĊĠĠĠĠĠĠĠ Ġval Ġstructured Composition : ĠJsonNode ? Ġ= Ġweb Template . convert From Raw To Structured ( composition , ĠFrom Raw Conversion . create ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition !!. path (" ctx "). path (" generic _ fields "). isObject ). isTrue ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition . path (" ctx "). path (" generic _ fields "). path (" field 1 "). isArray ). isTrue ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition . path (" ctx "). path (" generic _ fields "). path (" field 1 "). path ( 0 ). text Value ()). isEqualTo (" val 1 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition . path (" ctx "). path (" generic _ fields "). path (" field 1 "). path ( 1 ). text Value ()). isEqualTo (" val 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition . path (" ctx "). path (" generic _ fields "). path (" field 2 "). path ( 0 ). text Value ()). isEqualTo (" val 3 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( structured Composition . path (" ctx "). path (" generic _ fields "). path (" field 2 "). path ( 1 ). text Value ()). isEqualTo (" val 4 ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Throws ( IOException :: class , ĠJAXB Exception :: class ) ĊĠĠĠ Ġfun Ġtest Feed er Audit Broken () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġflat Map Ġ= Ġget ObjectMapper (). readValue ( get Json ("/ convert / composition s / gel _ data . json "), Ġobject Ġ: ĠType Reference < Map < String , ĠAny >> (){ }) ĊĠĠĠĠĠĠĠ Ġval Ġweb Template : ĠWeb Template Ġ= ĠWeb Template Builder . build NonNull ( get Template ("/ convert / templates / G EL ĠC ancer Ġdi agnosis Ġinput . opt "), ĠWeb Template Builder Context (" en ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġcomposition : ĠComp osition ? Ġ= Ġweb Template . convert From Flat To Raw ( flatMap , ĠConversion Context . create (). build ()) ĊĠĠĠĠĠĠĠ ĠassertThat ( composition ). isNotNull ĊĊĠĠĠĠĠĠĠ Ġval Ġpath Value Extractor Ġ= ĠName And Node Matching Path Value Extractor ("/ content [ open E HR - E HR - EVAL UATION . problem _ di agnosis . v 1 ]") ĊĠĠĠĠĠĠĠ Ġval Ġvalues Ġ= Ġpath Value Extractor . getValue ( composition ) ĊĠĠĠĠĠĠĠ ĠassertThat ( values ). isNotEmpty ĊĊĠĠĠĠĠĠĠ Ġval Ġvalue Ġ= Ġvalues [ 0 ] Ġas ĠLoc atable ĊĠĠĠĠĠĠĠ ĠassertThat ( value . feed er Audit ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( value . feed er Audit !!. origin ating System Audit !!. system Id ). isEqualTo (" info flex ") ĊĠĠĠĠĠĠĠ ĠassertThat ( value . feed er Audit !!. origin ating System Audit !!. time !!. value ). isEqualTo (" 2 0 1 8 - 0 1 - 0 1 T 0 3 : 0 0 Z ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Deep Composition (): ĠComp osition Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalues : ĠMap < String , ĠAny > Ġ= ĠImmutableMap . builder < String , ĠAny >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id ", Ġ" 1 2 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | name ", Ġ" Testing ĠDoctor ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id _ scheme ", Ġ" seq ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit / location | id _ namespace ", Ġ" k zz ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | time ", Ġ" 2 0 1 7 - 0 1 - 3 1 T 0 0 : 0 0 : 0 0 Z ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | magnitude ", Ġ 3 4 . 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | unit ", Ġ" Â° C ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / sy mptoms : 0 | code ", Ġ" at 0 . 6 5 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / body _ ex posure | code ", Ġ" at 0 0 3 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / description _ of _ ther mal _ stress ", Ġ" Description Ġof Ġth ermal Ġstress Ġ 7 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġbuilder Context Ġ= ĠConversion Context . create (). with Language (" en "). with T erritory (" SI "). build () ĊĠĠĠĠĠĠĠ Ġreturn Ġweb Template . convert From Flat To Raw ( values , Ġbuilder Context ) !! ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Composition With Multi Media (): ĠComp osition Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalues : ĠMap < String , ĠAny > Ġ= ĠImmutableMap . builder < String , ĠAny >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content _ mult imedia | url ", Ġ" http :// www . mar and . com ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content _ mult imedia | medi atype ", Ġ" text / html ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | magnitude ", Ġ 3 4 . 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | unit ", Ġ" Â° C ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / sy mptoms : 0 | code ", Ġ" at 0 . 6 5 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / body _ ex posure | code ", Ġ" at 0 0 3 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / description _ of _ ther mal _ stress ", Ġ" Description Ġof Ġth ermal Ġstress Ġ 7 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġbuilder Context Ġ= ĠConversion Context . create (). with Language (" en "). with T erritory (" SI "). build () ĊĠĠĠĠĠĠĠ Ġreturn Ġweb Template . convert From Flat To Raw ( values , Ġbuilder Context ) !! ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġbuild Composition (): ĠComp osition Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalues : ĠMap < String , ĠAny > Ġ= ĠImmutableMap . builder < String , ĠAny >() ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content ", Ġ" Hello Ġworld !") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / original _ content | form al ism ", Ġ" text / plain ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | assign er ", Ġ" assign er 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | issuer ", Ġ" issuer 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | id ", Ġ" id 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 0 | type ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | assign er ", Ġ" assign er 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | issuer ", Ġ" issuer 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | id ", Ġ" id 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ item _ id : 1 | type ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | assign er ", Ġ" assign er 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | issuer ", Ġ" issuer 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | id ", Ġ" id 1 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 0 | type ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | assign er ", Ġ" assign er 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | issuer ", Ġ" issuer 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | id ", Ġ" id 2 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / feed er _ system _ item _ id : 1 | type ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | system _ id ", Ġ" orig ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 /_ feed er _ audit / origin ating _ system _ audit | version _ id ", Ġ" vv v ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | magnitude ", Ġ 3 4 . 1 ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / temperature | unit ", Ġ" Â° C ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / sy mptoms : 0 | code ", Ġ" at 0 . 6 5 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / body _ ex posure | code ", Ġ" at 0 0 3 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. put (" vit als / vit als / body _ temperature : 0 / any _ event : 0 / description _ of _ ther mal _ stress ", Ġ" Description Ġof Ġth ermal Ġstress Ġ 7 3 ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠĠĠĠĠ Ġval Ġbuilder Context Ġ= ĠConversion Context . create (). with Language (" en "). with T erritory (" SI "). build () ĊĠĠĠĠĠĠĠ Ġreturn Ġweb Template . convert From Flat To Raw ( values , Ġbuilder Context ) !! ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġvalidate Feed er Audit ( composition : ĠComp osition ) Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( composition ). isNotNull ĊĊĠĠĠĠĠĠĠ Ġval Ġfeed er Audit Ġ= Ġget Feed er Audit ( composition ) ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit ). isNotNull ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit !!. original Content ). isInstanceOf ( Dv Par s able :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġval Ġoriginal Content Ġ= Ġfeed er Audit . original Content Ġas ĠD v Par s able ? ĊĠĠĠĠĠĠĠ ĠassertThat ( original Content !!. value ). isEqualTo (" Hello Ġworld !") ĊĠĠĠĠĠĠĠ ĠassertThat ( original Content . form al ism ). isEqualTo (" text / plain ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Item Ids ). has Size ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Item Ids ). extract ing (" assign er "). contains Exactly (" assign er 1 ", Ġ" assign er 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Item Ids ). extract ing (" issuer "). contains Exactly (" issuer 1 ", Ġ" issuer 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Item Ids ). extract ing (" id "). contains Exactly (" id 1 ", Ġ" id 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Item Ids ). extract ing (" type "). contains Exactly (" PERSON ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . feed er System Item Ids ). has Size ( 2 ) ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . feed er System Item Ids ). extract ing (" assign er "). contains Exactly (" assign er 1 ", Ġ" assign er 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . feed er System Item Ids ). extract ing (" issuer "). contains Exactly (" issuer 1 ", Ġ" issuer 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . feed er System Item Ids ). extract ing (" id "). contains Exactly (" id 1 ", Ġ" id 2 ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . feed er System Item Ids ). extract ing (" type "). contains Exactly (" PERSON ", Ġ" PERSON ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Audit !!. system Id ). isEqualTo (" orig ") ĊĠĠĠĠĠĠĠ ĠassertThat ( feed er Audit . origin ating System Audit !!. version Id ). isEqualTo (" vv v ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Feed er Audit ( composition : ĠComp osition ): ĠFeed er Audit ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsection Ġ= Ġcomposition . content [ 0 ] Ġas ĠSection ĊĠĠĠĠĠĠĠ Ġval Ġobservation Ġ= Ġsection . items [ 0 ] Ġas ĠOb servation ĊĠĠĠĠĠĠĠ Ġreturn Ġobservation . feed er Audit ĊĠĠĠ Ġ} Ċ } Ċ