#NEWLINE# def test_remove_entry_listener( self ) : #NEWLINE# #INDENT# collector = event_collector ( ) #NEWLINE# id = self . map . add_entry_listener ( added = collector ) #NEWLINE# self . map . put ( 'key' , 'value' ) #NEWLINE# self . assertTrueEventually ( ( lambda : self . assertEqual ( len ( collector . events ) , 1 ) ) ) #NEWLINE# self . map . remove_entry_listener ( id ) #NEWLINE# self . map . put ( 'key2' , 'value' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . assertEqual ( len ( id . events ) , 1 )