package Ġcom . trib 3 . config . modules Ċ Ċ import Ġassert k . assertThat Ċ import Ġassert k . assertions . isEqualTo Ċ import Ġassert k . assertions . isNotNull Ċ import Ġcom . google . inject . Gu ice Ċ import Ġcom . trib 3 . config . ASSERT _ VAL Ċ import Ġcom . trib 3 . config . K MS String Select Reader Ċ import Ġcom . trib 3 . testing . Le aky Mock Ċ import Ġdev . mis fit labs . kot ling u ice 4 . getInstance Ċ import Ġorg . easy mock . Easy Mock Ċ import Ġorg . testng . annotations . Test Ċ import Ġsoftware . amazon . aw ssdk . core . Sdk Bytes Ċ import Ġsoftware . amazon . aw ssdk . services . kms . K ms Client Ċ import Ġsoftware . amazon . aw ssdk . services . kms . model . Decrypt Request Ċ import Ġsoftware . amazon . aw ssdk . services . kms . model . Decrypt Response Ċ Ċ class ĠK MS Module Test Ġ{ ĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Bind () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfake K ms Ġ= ĠLe aky Mock . mock < K ms Client >(). also Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEasy Mock . expect ( it . decrypt ( Easy Mock . any Object ( Decrypt Request :: class . java ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. andReturn ( Decrypt Response . builder (). plaintext ( Sdk Bytes . from Utf 8 String ( ASSERT _ VAL )). build ()). any Times () ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEasy Mock . replay ( it ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ// Ġconstruct Ġa ĠK MS String Select Reader Ġto Ġfill Ġin Ġ_ INSTANCE Ġk ms Ġso Ġreal Ġk ms Ġdoesn 't Ġget Ġinserted Ġfor Ġother Ġtests ĊĠĠĠĠĠĠĠ ĠK MS String Select Reader ( fake K ms ) ĊĠĠĠĠĠĠĠ Ġval Ġk ms Client Ġ= ĠGu ice . create Injector ( K MS Module ()). getInstance < K ms Client >() ĊĠĠĠĠĠĠĠ ĠassertThat ( kms Client ). isNotNull () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Equals () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertThat ( K MS Module ()). isEqualTo ( K MS Module ()) ĊĠĠĠ Ġ} Ċ } Ċ