package Ġde . ma ib orn w ol ff . domain ch oreo graph . an alytic ss erver Ċ Ċ import Ġcom . n ha ar man . mockito _ kotlin . mock Ċ import Ġcom . n ha ar man . mockito _ kotlin . verify Ċ import Ġde . ma ib orn w ol ff . domain ch oreo graph . an alytic ss erver . events . EventListener Callback Ċ import Ġde . ma ib orn w ol ff . domain ch oreo graph . export definitions . model . Export Graph Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . Before Ċ import Ġorg . junit . Test Ċ Ċ internal Ġclass ĠGraph Repository Test Ġ{ ĊĠ Ġlateinit Ġvar Ġrepository : ĠGraph Repository ĊĊĠ Ġ@ Before ĊĠ Ġfun ĠbeforeEach () Ġ{ ĊĠĠĠ Ġrepository Ġ= ĠGraph Repository () ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġfun Ġadd Graph () Ġ{ ĊĠĠĠ Ġval Ġmock Listener : ĠEvent Listener Callback < Export Graph > Ġ= Ġmock () ĊĊĠĠĠ Ġrepository . on Add Graph . subscribe ( mock Listener ) ĊĠĠĠ Ġrepository . add Graph ( mock Graph ) ĊĊĠĠĠ ĠassertThat ( repository . graphs ). isEqualTo ( listOf ( mock Graph )) ĊĠĠĠ Ġverify ( mock Listener ). invoke ( mock Graph ) ĊĠ Ġ} Ċ } Ċ