package Ġuk . gov . just ice . digital . h mp ps . gradle . config managers Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . assertj . core . api . Assertions . tuple Ċ import Ġorg . assertj . core . groups . Tuple Ċ import Ġorg . gradle . api . tasks . Copy Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġuk . gov . just ice . digital . h mp ps . gradle . UnitTest Ċ Ċ class ĠApp Insights Config Manager Test Ġ: ĠUnit Test () Ġ{ ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Should Ġapply Ġapp Ġinsights Ġlibraries `() Ġ{ ĊĠĠĠ ĠassertThat ( project . configurations . get ByName (" implementation "). dependencies ) ĊĠĠĠĠĠ Ġ. extract ing < Tuple > Ġ{ Ġtuple ( it . group , Ġit . name ) Ġ} ĊĠĠĠĠĠ Ġ. contains ( ĊĠĠĠĠĠĠĠ Ġtuple (" net . logstash . log back ", Ġ" logstash - log back - encoder "), ĊĠĠĠĠĠĠĠ Ġtuple (" com . microsoft . azure ", Ġ" application insights - spring - boot - starter "), ĊĠĠĠĠĠĠĠ Ġtuple (" com . microsoft . azure ", Ġ" application insights - logging - log back ") ĊĠĠĠĠĠ Ġ) ĊĠ Ġ} ĊĊĠ Ġ// ĠThe Ġtest Ġfails Ġif Ġan Ġexception Ġis Ġthrown ĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Should Ġcreate Ġagent Deps Ġconfiguration `() Ġ{ ĊĠĠĠ Ġproject . configurations . get ByName (" agent Deps ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Should Ġcreate Ġcopy Agent Ġtask `() Ġ{ ĊĠĠĠ Ġval Ġcopy Agent Task Ġ= Ġproject . tasks . get ByName (" copy Agent ") Ġas ĠCopy ĊĠĠĠ ĠassertThat ( copy Agent Task . destination Dir . absolute Path ). contains (" lib ") ĊĠĠĠ ĠassertThat ( copy Agent Task . source . single File . name ). contains (" application insights ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` assemble Ġtask Ġshould Ġdepend Ġon Ġcopy Agent Ġtask `() Ġ{ ĊĠĠĠ Ġval Ġassemble Task Ġ= Ġproject . tasks . get ByName (" assemble ") ĊĠĠĠ Ġval Ġdepends On Ġ= Ġassemble Task . task Dependencies . get Dependencies ( assemble Task ) ĊĠĠĠ ĠassertThat ( depends On ). extract ing < String > Ġ{ Ġit . name Ġ}. contains (" copy Agent ") ĊĠ Ġ} Ċ } Ċ