package Ġcom . github . mac c aml c . secrets . property source . aws . parameter store Ċ Ċ import Ġch . tut tel i . at rium . api . fluent . en _ GB . contains Ċ import Ġch . tut tel i . at rium . api . fluent . en _ GB . feature Ċ import Ġch . tut tel i . at rium . api . fluent . en _ GB . is A Ċ import Ġch . tut tel i . at rium . api . fluent . en _ GB . toBe Ċ import Ġch . tut tel i . at rium . api . ver bs . assertThat Ċ import Ġio . mock k . Called Ċ import Ġio . mock k . confirm Verified Ċ import Ġio . mock k . every Ċ import Ġio . mock k . mock k Ċ import Ġio . mock k . verify Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . boot . Spring Application Ċ import Ġorg . springframework . core . env . Configurable Environment Ċ import Ġorg . springframework . core . env . Mutable Property Sources Ċ Ċ internal Ġclass ĠAws Parameter Store Property Source Environment Post Processor Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġconfigurable Environment : ĠConfigur able Environment Ġ= Ġmock k () ĊĊĠĠĠ Ġprivate Ġval Ġspring Application : ĠSpring Application Ġ= Ġmock k () ĊĊĠĠĠ Ġprivate Ġval Ġproperty Source : ĠMutable Property Sources Ġ= ĠMutable Property Sources () ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġsecrets Property Source Environment Post Processor : ĠAws Parameter Store Property Source Environment Post Processor ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġinternal Ġfun Ġsetup () Ġ{ ĊĠĠĠĠĠĠĠ Ġevery Ġ{ Ġconfigurable Environment . property Sources Ġ} Ġreturns Ġproperty Source ĊĊĠĠĠĠĠĠĠ Ġsecrets Property Source Environment Post Processor Ġ= ĠAws Parameter Store Property Source Environment Post Processor () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġinternal Ġfun Ġ` should Ġhave Ġexpected Ġname `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( secrets Property Source Environment Post Processor . secrets Property Source Name ). toBe (" AWS Parameter Store Property Source ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġinternal Ġfun Ġ` should Ġhave Ġexpected Ġprefix `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( secrets Property Source Environment Post Processor . secrets Prefix ). toBe ("/ aws - parameter store /") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġinternal Ġfun Ġ` should Ġhave Ġexpected Ġsource Ġthat Ġprovides ĠAWS ĠParameter ĠStore `() Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( secrets Property Source Environment Post Processor . secrets Source ). is A < Aws Parameter Store Source > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfeature ({ Ġp ( it :: aws Simple Systems Management Supplier ) Ġ}) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfeature ({ Ġf ( it :: invoke ) Ġ}) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġfeature Ġ{ Ġf ( it :: toString ) Ġ}. contains (" com . amazonaws . services . simp les ystem s management . AW SS imple Systems Management Client ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġinternal Ġfun Ġ` should Ġadd Ġproperty Ġsource Ġto Ġbeginning Ġof Ġenvironment `() Ġ{ ĊĠĠĠĠĠĠĠ Ġsecrets Property Source Environment Post Processor . post Process Environment ( configurable Environment , Ġspring Application ) ĊĊĠĠĠĠĠĠĠ Ġverify Ġ{ Ġconfigurable Environment . property Sources Ġ} ĊĠĠĠĠĠĠĠ Ġverify Ġ{ Ġspring Application Ġwas Not ĠCalled Ġ} ĊĠĠĠĠĠĠĠ Ġconfirm Verified ( configurable Environment , Ġspring Application ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( property Source ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfeature Ġ{ Ġf ( it :: size ) Ġ}. toBe ( 1 ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ