package Ġuk . gov . just ice . digital . as sess ments . repositories Ċ Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġuk . gov . just ice . digital . as sess ments . jpa . repositories . ref data . Question Group Repository Ċ import Ġuk . gov . just ice . digital . as sess ments . test utils . IntegrationTest Ċ import Ġjava . util . UUID Ċ Ċ class ĠQuestion Group Repository Test (@ Autowired Ġval Ġquestion Group Repository : ĠQuestion Group Repository ) Ġ: ĠIntegration Test () Ġ{ ĊĠ Ġval Ġgroup Uuid : ĠUUID Ġ= ĠUUID . fromString (" eb 7 b 7 3 2 4 - f 2 a 6 - 4 9 0 2 - 9 1 ef - 7 0 9 a 8 fab 1 f 8 2 ") ĊĠ Ġval Ġquestion Schema Uuid : ĠUUID Ġ= ĠUUID . fromString (" 5 ca 8 6 a 0 6 - 5 4 7 2 - 4 8 6 1 - bd 6 a - a 0 1 1 7 8 0 db 4 9 a ") ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` fetch Ġgroup Ġcontents `() Ġ{ ĊĠĠĠ Ġval Ġquestion Group Entities Ġ= Ġquestion Group Repository . findBy Group Group Uuid ( group Uuid ) ĊĠĠĠ ĠassertThat ( question Group Entities ). has Size ( 1 4 ) ĊĊĠĠĠ Ġval Ġquestion Group Entity Ġ= Ġquestion Group Entities !!. first () ĊĠĠĠ ĠassertThat ( question Group Entity . contentType ). isEqualTo (" question ") ĊĠĠĠ ĠassertThat ( question Group Entity . content Uuid ). isEqualTo ( question Schema Uuid ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġ` list Ġgroup Ġsummar ies `() Ġ{ ĊĠĠĠ Ġval Ġgroup Sum maries Ġ= Ġquestion Group Repository . list Groups () ĊĠĠĠ ĠassertThat ( group Sum maries ). has Size ( 5 5 ) ĊĊĠĠĠ Ġval Ġgroup Info Ġ= Ġgroup Sum maries . find Ġ{ Ġit . group Code Ġ== Ġ" risk _ to _ others " Ġ} ĊĊĠĠĠ ĠassertThat ( group Info ?. group Uuid ). isEqualTo (" 9 4 6 0 9 1 d 2 - 4 0 3 8 - 4 e 2 b - 9 2 8 3 - 8 3 cc 4 8 7 6 f 6 ed ") ĊĠĠĠ ĠassertThat ( group Info ?. heading ). isEqualTo (" Risk Ġto Ġothers ") ĊĠĠĠ ĠassertThat ( group Info ?. content Count ). isEqualTo ( 3 3 ) ĊĠĠĠ ĠassertThat ( group Info ?. group Count ). isEqualTo ( 0 ) ĊĠĠĠ ĠassertThat ( group Info ?. question Count ). isEqualTo ( 3 3 ) ĊĠ Ġ} Ċ } Ċ