def test_filtered_channel(self):
        channelFilter = FilteredChannelFactory.FilteredChannel(callbackScheduler, self.filterMinId)
        try:
            sender, receiver = channelFilter.getChannelPair()
            filteredMessage = SharedState.MessageOut.MinimumIdResponse(0)
            sender.write(filteredMessage)

            toGet = [None]
            def tryGet():
                try:
                    toGet[0] = receiver.get()
                except UserWarning:
                    if channelFilter.stopFlag.is_set():
                        return
                    else:
                        raise

            t = ManagedThread.ManagedThread(target=tryGet)
            t.start()
            t.join(1)
            self.assertIsNone(toGet[0])
        finally:
            channelFilter.teardown()
Verify that message filtering works
dataset/ETHPy150Open ufora/ufora/ufora/distributed/SharedState/tests/SharedStateMessageFiltering_test.py/MessageFilteringTest.test_filtered_channel