Foundation.sendReturnsVoid(proxy2.id(), "testTakesIDReturnsID:", ID.fromLong(43));
assertEquals(ID.fromLong(43), implementor2.arg);
}
@Test public void testNotifications() {
NSNotificationCenter notificationCentre = NSNotificationCenter.CLASS.defaultCenter();
final ID observer = proxy.id();
notificationCentre.addObserver_selector_name_object(
observer,
Foundation.selector("notify:"),
"MyNotification",
null);
NSNotification notification = NSNotification.CLASS.notificationWithName_object("MyNotification", null);
assertNull(implementor.arg);
notificationCentre.postNotification(notification);
assertEquals(notification, implementor.arg);
notificationCentre.removeObserver(observer);
}