def METHOD_NAME(self):
    obj = self.obj_factory()
    # Set obj.foo to 3 on a separate thread.
    def set_foo_to_3(obj):
        obj.foo = 3
    threading.Thread(target=set_foo_to_3, args=(obj,)).start()
    # Wait for a while to make sure the function has finished.
    time.sleep(0.1)
    self.flush_event_loop()
    notifications = self.notifications
    self.assertEqual(len(notifications), 1)
    thread_id, event = notifications[0]
    self.assertEqual(event, (obj, "foo", 0, 3))
    ui_thread = trait_notifiers.ui_thread
    self.assertEqual(thread_id, ui_thread)