package Ġuk . gov . just ice . digital . h mp ps . gradle . functional . plugin managers Ċ Ċ import Ġnet . javac r umb s . json unit . assertj . Json Assertions . assertThat Json Ċ import Ġorg . junit . jupiter . api . After All Ċ import Ġorg . junit . jupiter . api . Before All Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . io . TempDir Ċ import Ġuk . gov . just ice . digital . h mp ps . gradle . functional . create And Run Jar Ċ import Ġuk . gov . just ice . digital . h mp ps . gradle . functional . java Project Details Ċ import Ġuk . gov . just ice . digital . h mp ps . gradle . functional . kotlin Project Details Ċ import Ġjava . io . File Ċ import Ġjava . net . URL Ċ import Ġjava . time . LocalDateTime Ċ import Ġjava . time . format . DateTime Formatter Ċ Ċ class ĠJava SpringBoot PluginManager Jar Test Ġ: ĠSpring Boot PluginManager Jar Test () Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġ@ Before All ĊĠĠĠ Ġ@ Jvm Static ĊĠĠĠ Ġfun Ġ` Create Ġand Ġrun Ġproject `() Ġ{ ĊĠĠĠĠĠ Ġjar Process Ġ= Ġcreate And Run Jar ( java Project Details ( project Dir )) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ class ĠKotlin SpringBoot PluginManager Jar Test Ġ: ĠSpring Boot PluginManager Jar Test () Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġ@ Before All ĊĠĠĠ Ġ@ Jvm Static ĊĠĠĠ Ġfun Ġ` Create Ġand Ġrun Ġproject `() Ġ{ ĊĠĠĠĠĠ Ġjar Process Ġ= Ġcreate And Run Jar ( kotlin Project Details ( project Dir )) ĊĠĠĠ Ġ} ĊĠ Ġ} Ċ } Ċ Ċ abstract Ġclass ĠSpring Boot PluginManager Jar Test Ġ{ ĊĊĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠ Ġ@ TempDir ĊĠĠĠ Ġ@ Jvm Static ĊĠĠĠ Ġlateinit Ġvar Ġproject Dir : ĠFile ĊĊĠĠĠ Ġvar Ġjar Process : ĠProcess ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ After All ĊĠĠĠ Ġ@ Jvm Static ĊĠĠĠ Ġfun Ġ` End Ġrunning Ġjar `() Ġ{ ĊĠĠĠĠĠ Ġjar Process ?. destroy For c ibly () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Spring ĠBoot Ġjar Ġis Ġup Ġand Ġhealthy `() Ġ{ ĊĠĠĠ Ġval Ġhealth Response Ġ= ĠURL (" http :// localhost : 8 0 8 0 / act uator / health "). read Text () ĊĠĠĠ ĠassertThat Json ( health Response ). node (" status "). isEqualTo (" UP ") ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Spring ĠBoot Ġinfo Ġendpoint Ġis Ġavailable `() Ġ{ ĊĠĠĠ ĠURL (" http :// localhost : 8 0 8 0 / act uator / info "). read Text () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Spring ĠBoot Ġinfo Ġendpoint Ġcontains Ġgit Ġinfo `() Ġ{ ĊĠĠĠ Ġval Ġinfo Response Ġ= ĠURL (" http :// localhost : 8 0 8 0 / act uator / info "). read Text () ĊĠĠĠ ĠassertThat Json ( info Response ). node (" git . branch "). isNotNull ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` Spring ĠBoot Ġinfo Ġendpoint Ġcontains Ġbuild Ġinfo `() Ġ{ ĊĠĠĠ Ġval Ġinfo Response Ġ= ĠURL (" http :// localhost : 8 0 8 0 / act uator / info "). read Text () ĊĠĠĠ ĠassertThat Json ( info Response ). node (" build . by "). isEqualTo ( System . getProperty (" user . name ")) ĊĠĠĠ ĠassertThat Json ( info Response ). node (" build . operating System "). isNotNull ĊĠĠĠ ĠassertThat Json ( info Response ). node (" build . machine "). isNotNull ĊĠĠĠ ĠassertThat Json ( info Response ). node (" build . time "). asString (). startsWith ( LocalDateTime . now (). format ( DateTime Formatter . ISO _ DATE )) ĊĠĠĠ ĠassertThat Json ( info Response ). node (" build . version "). isEqualTo ( LocalDateTime . now (). format ( DateTime Formatter . ISO _ DATE )) ĊĠ Ġ} Ċ } Ċ