#NEWLINE# def test_add_entry_listener_with_predicate( self ) : #NEWLINE# #INDENT# collector = event_collector ( ) #NEWLINE# self . map . add_entry_listener ( predicate = SqlPredicate ( 'this == value1' ) , include_value = True , added = assert_event ) #NEWLINE# self . map . put ( 'key2' , 'value2' ) #NEWLINE# self . map . put ( 'key1' , 'value1' ) #NEWLINE# def assert_event( ) : #NEWLINE# #INDENT# self . assertEqual ( len ( collector . events ) , 1 ) #NEWLINE# event = collector . events [ 0 ] #NEWLINE# self . assertEntryEvent ( event , key = 'key1' , event_type = EntryEventType . added , value = 'value1' ) #NEWLINE# #UNINDENT# self . assertTrueEventually ( assert_event , 5 )