package Ġio . demo . payments ystem . unit Ċ Ċ import Ġio . demo . payments ystem . api . User Ċ import Ġio . demo . payments ystem . dao . User Dao Ċ import Ġio . demo . payments ystem . utils . dao Ċ import Ġorg . junit . Assert . assertNotNull Ċ import Ġorg . junit . Test Ċ import Ġkotlin . test . assertEquals Ċ Ċ class ĠUser Dao Test Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġuser Dao Ġ= Ġdao ( User Dao :: class ) ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Insert () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinserted User Ġ= Ġuser Dao . insert ( User ( null , Ġ" first ", Ġ" second ")) ĊĊĠĠĠĠĠĠĠ ĠassertNotNull ( inserted User . id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest Find () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġinserted User Ġ= Ġuser Dao . insert ( User ( null , Ġ" first ", Ġ" second ")) ĊĊĠĠĠĠĠĠĠ Ġval Ġfound User Ġ= Ġuser Dao . find ( inserted User . id ) ĊĊĠĠĠĠĠĠĠ ĠassertNotNull ( found User ) ĊĠĠĠĠĠĠĠ ĠassertEquals ( inserted User . id , Ġfound User ?. id ) ĊĠĠĠ Ġ} Ċ }