package Ġpl . be one . prom ena . alf resco . module . core . external . transformation . post Ċ Ċ import Ġio . kot lint est . shouldBe Ċ import Ġio . mock k . every Ċ import Ġio . mock k . mock k Ċ import Ġorg . alf resco . model . Content Model . TYPE _ CONTENT Ċ import Ġorg . alf resco . service . Service Registry Ċ import Ġorg . junit . Test Ċ import Ġorg . springframework . context . ApplicationContext Ċ import Ġpl . be one . prom ena . alf resco . module . core . application model . node . Node Descriptor Ċ import Ġpl . be one . prom ena . alf resco . module . core . application model . transformation . Transformation Execution Result Ċ import Ġpl . be one . prom ena . alf resco . module . core . contract . transformation . post . Post Transformation Executor Ċ import Ġpl . be one . prom ena . transformer . contract . transformation . Transformation Ċ Ċ class ĠReflection Post Transformation Executor Injector Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġinject () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġapplication Context Ġ= Ġmock k < ApplicationContext > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġid Ġ} Ġreturns Ġ" application Context " ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġval Ġservice Registry Ġ= Ġmock k < Service Registry > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġevery Ġ{ Ġget Service ( TYPE _ CONTENT ) Ġ} Ġreturns Ġ" service Registry " ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġval Ġpost Transformation Executor Ġ= ĠTest Post Transformation Executor () ĊĠĠĠĠĠĠĠ ĠReflection Post Transformation Executor Injector ( application Context , Ġservice Registry ). inject ( post Transformation Executor ) ĊĊĠĠĠĠĠĠĠ Ġpost Transformation Executor . execute ( mock k (), Ġmock k (), Ġmock k ()) ĊĠĠĠĠĠĠĠ Ġpost Transformation Executor . text ĠshouldBe Ġ" application Context - service Registry " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġclass ĠTest Post Transformation Executor Ġ: ĠPost Transformation Executor () Ġ{ ĊĊĠĠĠĠĠĠĠ Ġlateinit Ġvar Ġtext : ĠString ĊĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġexecute ( transformation : ĠTransformation , Ġnode Descriptor : ĠNode Descriptor , Ġresult : ĠTransformation Execution Result ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtext Ġ= Ġapplication Context . id !! Ġ+ Ġ"-" Ġ+ Ġservice Registry . getService ( TYPE _ CONTENT ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }