### Question:
PlainMailbox implements Mailbox, AlarmListener { public void unregisterNotify( Notify oldNotify ) { if (oldNotify == null) throw new NullPointerException( "oldNotify == null" ); if (notify == null) return; synchronized (queue) { if (oldNotify != notify) throw new IllegalStateException( "oldNotify != this.notify" ); if (alarmSet) { alarmSet = false; AlarmManager.staticRemove( this ); } notify = null; state = null; } } PlainMailbox( MailboxManager mailboxManager, Long messageId ); MailboxManager getMailboxManager(); Long getMessageId(); boolean message( Who sender, Message msg ); Mailbox.Element read(); Mailbox.Element read( int maxDelay ); boolean closeDelivery(); boolean closeRead(); int wakeup( AlarmManager manager, Object xstate, long due ); void registerNotify( Notify newNotify, Object newState, int maxDelay ); void unregisterNotify( Notify oldNotify ); boolean isEmpty(); boolean isClosed(); boolean isFull();  }### Answer:
@Test public void unreg1() throws Exception { PlainMailbox mb = new PlainMailbox( mmgr, 1L ); mb.unregisterNotify( notify ); }