### Question:
PlainMailboxManager implements MailboxManager { public void transportMessage( Who recipient, Message msg ) throws Exception { if (msg.getMessageId() != null) throw new IllegalStateException( "message has already been sent" ); msg.setMessageId( idGen.next() ); transport.transportMessage( recipient, msg ); } PlainMailboxManager( TransportMessage transport, String uri,
		Resources resources );  PlainMailboxManager( TransportMessage transport, URL uri,
		Resources resources ); TransportMessage getTransport(); @Override String toString(); boolean sessionMessage( Who sender, Message msg ); void transportMessage( Who recipient, Message msg ); Mailbox transportCall( Who recipient, Message msg ); void register( Mailbox mb ); void unregister( Mailbox mb ); Mailbox getMailbox( Long msgid ); void redeliver( Who sender, Message msg ); int size(); Object sessionQuery( Object query ); void sessionControl( Object control, Object value ); void sessionNotify( Object event ); Object transportQuery( Object query ); void transportControl( Object control, Object value ); void transportNotify( Object event ); SessionMessage getSession(); void setSession( SessionMessage session );  }### Answer:
@Test( expected = IllegalStateException.class ) public void transportMessage3() throws Exception { assertNull( transport.what ); assertNull( transport.recipient ); assertNull( transport.msg ); Message msg = constructAddMessage(); assertNull( msg.getMessageId() ); msg.setMessageId( 1L ); mmgr.transportMessage( who, msg ); }