public void TestNotificationByBlock()
{
bool notified = false;
Action<NSNotification> action = delegate(NSNotification notification) {
notified = true;
};
Id listener = NSNotificationCenter.DefaultCenter.AddObserverForNameObjectQueueUsingBlock(MyListener.SELECTOR_NOTIFICATION, null, null, action);
mre = new ManualResetEvent(false);
new Thread(this.Notify).Start();
mre.WaitOne(5000);
Assert.IsTrue(notified, "Listener must be notified");
NSNotificationCenter.DefaultCenter.RemoveObserver(listener);
}