package Ġcom . da im ler . mb ingress kit . implementation . network Ċ Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . Api Input Error Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . Api Input Errors Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . Consent Api Input Errors Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . to Registration Errors Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . to User Input Error Ċ import Ġcom . da im ler . mb ingress kit . implementation . network . model . to User Input Errors Ċ import Ġorg . assertj . core . api . Soft Assertions Ċ import Ġorg . assertj . core . api . junit . jupiter . Soft Assertions Extension Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ Ċ @ Extend With ( Soft Assertions Extension :: class ) Ċ class ĠError Converter Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġmapping Ġfrom ĠApi Input Errors Ġto ĠUser Input Errors `( soft ly : ĠSoft Assertions ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġapi Error Ġ= ĠApi Input Error (" name ", Ġ" description ") ĊĠĠĠĠĠĠĠ Ġval Ġerror Ġ= Ġapi Error . to User Input Error () ĊĠĠĠĠĠĠĠ Ġsoft ly . assertThat ( error . fieldName ). isEqualTo ( api Error . fieldName ) ĊĠĠĠĠĠĠĠ Ġsoft ly . assertThat ( error . description ). isEqualTo ( api Error . description ) ĊĠĠĠĠĠĠĠ Ġval Ġapi Errors Ġ= ĠApi Input Errors ( listOf ( api Error )) ĊĠĠĠĠĠĠĠ Ġval Ġerrors Ġ= Ġapi Errors . to User Input Errors () ĊĠĠĠĠĠĠĠ Ġsoft ly . assertThat ( errors . errors . size ). isEqualTo ( 1 ) ĊĠĠĠĠĠĠĠ Ġsoft ly . assertThat ( errors . errors . first ()). isEqualTo ( error ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` test Ġmapping Ġfrom ĠCon sent Api Errors Ġto ĠRegistration Errors `( soft ly : ĠSoft Assertions ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġapi Errors Ġ= ĠCon sent Api Input Errors ( null , Ġtrue ) ĊĠĠĠĠĠĠĠ Ġval Ġerrors Ġ= Ġapi Errors . to Registration Errors () ĊĠĠĠĠĠĠĠ Ġsoft ly . assertThat ( errors . consent Not Given ). isEqualTo ( api Errors . consent Not Given ) ĊĠĠĠ Ġ} Ċ } Ċ