package Ġfund . cyber . contract . bitcoin . delta Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin . any Ċ import Ġcom . n ha ar man . mockito _ kotlin . do Return Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġfund . cyber . Update Bitcoin Contract Summary Application Ċ import Ġfund . cyber . cassandra . C assandra TestBase Ċ import Ġfund . cyber . common . kafka . Base Kafka IntegrationTest With Started Kafka Ċ import Ġfund . cyber . search . model . bitcoin . Bitcoin Tx Ċ import Ġfund . cyber . search . model . chains . Chain Family Ċ import Ġfund . cyber . search . model . chains . Chain Info Ċ import Ġfund . cyber . search . model . events . Pump Event Ċ import Ġorg . apache . http . HttpResponse Ċ import Ġorg . apache . http . HttpStatus Ċ import Ġorg . apache . http . Status Line Ċ import Ġorg . apache . http . client . HttpClient Ċ import Ġorg . apache . http . message . Basic HttpResponse Ċ import Ġorg . assertj . core . api . Assertions Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . context . annotation . Primary Ċ import Ġorg . springframework . kafka . listener . Concurrent Message Listener Container Ċ import Ġorg . springframework . test . annotation . Dir ties Context Ċ import Ġorg . springframework . test . context . Context Configuration Ċ import Ġorg . springframework . test . context . Test Property Source Ċ Ċ @ Configuration Ċ class ĠBase Bitcoin Context Test Config Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġ@ Primary ĊĠĠĠ Ġfun Ġmocked HttpClient () Ġ= Ġmock < HttpClient > Ġ{ ĊĠĠĠĠĠĠĠ Ġon Ġ{ Ġexecute ( any ()) Ġ} Ġdo Return ĠhttpResponse Ok () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun ĠhttpResponse Ok (): ĠHttpResponse Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġstatus Line Ok Ġ= Ġobject Ġ: ĠStatus Line Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget StatusCode () Ġ= ĠHttpStatus . SC _ OK ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Protocol Version () Ġ= Ġnull ĊĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġget Reason Phrase () Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn ĠBasic HttpResponse ( status Line Ok ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ C assandra TestBase Ċ @ Dir ties Context Ċ @ Context Configuration ( classes Ġ= Ġ[ Update Bitcoin Contract Summary Application :: class , ĠBase Bitcoin Context Test Config :: class ]) Ċ abstract Ġclass ĠBase Bitcoin Context Test : ĠBase Kafka IntegrationTest With Started Kafka () Ċ Ċ @ Test Property Source ( properties Ġ= Ġ[" CHAIN _ FAMILY : BIT CO IN "]) Ċ class ĠContext Start Up Test : ĠBase Bitcoin Context Test () Ġ{ ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġlateinit Ġvar Ġchain Info : ĠChain Info ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġlateinit Ġvar Ġtx Listener : ĠConcurrent Message Listener Container < Pump Event , ĠBitcoin Tx > ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġshould Create Context With Listeners () Ġ{ ĊĠĠĠĠĠĠĠ ĠAssertions . assertThat ( chain Info ). isNotNull () ĊĠĠĠĠĠĠĠ ĠAssertions . assertThat ( chain Info . family ). isEqualTo ( Chain Family . BIT CO IN ) ĊĠĠĠĠĠĠĠ ĠAssertions . assertThat ( tx Listener ). isNotNull () ĊĠĠĠ Ġ} Ċ }