package Ġcom . github . fish er man 0 8 . mic ronaut books . controller . writer Ċ Ċ import Ġcom . github . fish er man 0 8 . mic ronaut books . TestUtils Ċ import Ġcom . github . fish er man 0 8 . mic ronaut books . controller . Api Paths Ċ import Ġcom . github . fish er man 0 8 . mic ronaut books . domain . writer . Writer Id Ċ import Ġcom . github . fish er man 0 8 . mic ronaut books . domain . writer . Writer Repository Ċ import Ġcom . github . fish er man 0 8 . mic ronaut books . domain . exception . NotFoundException Ċ import Ġio . kot est . assertions . throw ables . should Throw Ċ import Ġio . kot est . core . spec . style . String Spec Ċ import Ġio . mic ronaut . http . HttpRequest Ċ import Ġio . mic ronaut . http . client . HttpClient Ċ import Ġio . mic ronaut . http . client . annotation . Client Ċ import Ġio . mic ronaut . http . client . exceptions . HttpClient Response Exception Ċ import Ġio . mic ronaut . runtime . server . Embedded Server Ċ import Ġio . mic ronaut . test . extensions . kot est . annotation . Mic ronaut Test Ċ import Ġio . mic ronaut . transaction . S ynchronous Transaction Manager Ċ import Ġorg . jooq . DSL Context Ċ import Ġjava . sql . Connection Ċ import Ġjava . util .* Ċ Ċ @ Mic ronaut Test Ċ class ĠWriter Delete Controller Test ( ĊĠĠĠ Ġprivate Ġval Ġserver : ĠEmbedded Server , ĊĠĠĠ Ġ@ Client ("/") ĊĠĠĠ Ġprivate Ġval Ġclient : ĠHttpClient , ĊĠĠĠ Ġprivate Ġval Ġd sl Context : ĠDSL Context , ĊĠĠĠ Ġprivate Ġval Ġtransaction Manager : ĠS ynchronous Transaction Manager < Connection >, ĊĠĠĠ Ġprivate Ġval Ġbook Repository : ĠWriter Repository Ċ ) Ġ: ĠString Spec ({ ĊĊĠĠĠ ĠTestUtils . cle a All Tables ( dsl Context , Ġtransaction Manager ) ĊĠĠĠ Ġval Ġexisting Id Ġ= ĠUUID . randomUUID () ĊĠĠĠ ĠTestUtils . insert Writer ( dsl Context , Ġtransaction Manager , Ġexisting Id , Ġ" ä¸ī å³ ¶ çĶ± ç´ Ģ å¤« ") ĊĊĠĠĠ Ġ" æĹ¢ åŃĺ ãģ® writer ãĤĴ åīĬéĻ¤ ãģ§ãģįãĤĭ " Ġ{ ĊĊĠĠĠĠĠĠĠ Ġshould Throw < HttpClient Response Exception > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ// Ġ 2 0 4 ãĥ¬ ãĤ¹ ãĥĿ ãĥ³ãĤ¹ ãģ«å¯¾ ãģĹãģ¦ client ãģ¯ Ġnull Ġbody Ġãģ¨ ãģĦãģĨ ä¾ĭ å¤ĸ ãĤĴ çĻº çĶŁ ãģķ ãģĽ ãĤĭ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġclient . to Blocking (). retrieve ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠHttpRequest . DELETE ( Api Paths . Writer . delete . replace ("{ id }", Ġexisting Id . toString ()), Ġnull ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġshould Throw < NotFoundException > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbook Repository . find ( Writer Id ( existing Id )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }) Ċ