#NEWLINE# def test_add_entry_listener_item_expired( self ) : #NEWLINE# #INDENT# collector = event_collector ( ) #NEWLINE# self . map . add_entry_listener ( include_value = True , expired = collector ) #NEWLINE# self . map . put ( 'key' , 'value' , ttl = 0.1 ) #NEWLINE# def assert_event( ) : #NEWLINE# #INDENT# self . assertEqual ( len ( collector . events ) , 1 ) #NEWLINE# event = collector . events [ 0 ] #NEWLINE# self . assertEntryEvent ( event , key = 'key' , event_type = EntryEventType . expired , old_value = 'value' ) #NEWLINE# #UNINDENT# self . assertTrueEventually ( self , 10 )