package Ġio . hol ix on . avro . adapter . common . cache Ċ Ċ import Ġio . hol ix on . avro . adapter . api . Av ro Adapter Api . schema Resolver Ċ import Ġio . hol ix on . avro . adapter . common . ext . Default Schema Ext . avro Schema With Id Ċ import Ġio . hol ix on . avro . adapter . common . registry . InMemory Av ro Schema ReadOnly Registry Ċ import Ġio . hol ix on . avro . lib . test . schema . Sample Event V 4 7 1 1 Ċ import Ġio . hol ix on . avro . lib . test . schema . Sample Event V 4 7 1 2 Ċ import Ġio . hol ix on . avro . lib . test . schema . Sample Event V 4 7 1 3 Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . mockito . Mockito . spy Ċ import Ġorg . mockito . Mockito . verify No Interactions Ċ import Ġorg . mockito . kotlin . verify Ċ Ċ internal Ġclass ĠConcurrent Map Caching Av ro Schema Resolver Test Ġ{ ĊĊĠ Ġprivate Ġval Ġschema Registry : ĠIn Memory Av ro Schema ReadOnly Registry Ġ= Ġspy ( ĊĠĠĠ ĠIn Memory Av ro Schema ReadOnly Registry . create With Schemas ( ĊĠĠĠĠĠ ĠSample Event V 4 7 1 1 . schema , ĊĠĠĠĠĠ ĠSample Event V 4 7 1 2 . schema , ĊĠĠĠĠĠ ĠSample Event V 4 7 1 3 . schema ĊĠĠĠ Ġ) ĊĠ Ġ) ĊĊĠ Ġprivate Ġval Ġcaching Resolver Ġ= ĠConcurrent Map Caching Av ro Schema Resolver ( schema Registry . schema Resolver ()) ĊĊĠ Ġ@ Test ĊĠ Ġinternal Ġfun Ġ` cache Ġis Ġempty `() Ġ{ ĊĠĠĠ ĠassertThat ( caching Resolver . cache ). isEmpty () ĊĠĠĠ Ġverify No Interactions ( schema Registry ) ĊĠ Ġ} ĊĊĠ Ġ@ Test ĊĠ Ġinternal Ġfun Ġ` resolver Ġis Ġonly Ġcalled Ġonce `() Ġ{ ĊĠĠĠ Ġval Ġschema 4 7 1 1 Ġ= Ġcaching Resolver . apply ( Sample Event V 4 7 1 1 . schema Data . schema Id ) ĊĠĠĠ ĠassertThat ( schema 4 7 1 1 ). hasValue ( Sample Event V 4 7 1 1 . schema . avro Schema With Id ) ĊĊĠĠĠ Ġ// Ġsecond Ġcall : Ġcache Ġhit : ĊĠĠĠ Ġcaching Resolver . apply ( Sample Event V 4 7 1 1 . schema Data . schema Id ) ĊĊĠĠĠ Ġ// Ġresolver Ġonly Ġcalled Ġonce ĊĠĠĠ Ġverify ( schema Registry ). findById ( Sample Event V 4 7 1 1 . schema Data . schema Id ) ĊĠĠĠ ĠassertThat ( caching Resolver . cache ). has Size ( 1 ) ĊĠ Ġ} Ċ } Ċ