### Question:
StubBase implements SessionMessage { public void sessionControl( Object control, Object value ) throws Exception { if (_obj instanceof ObjSession) ((ObjSession) _obj)._sessionControl( control, value ); else throw new UnsupportedOperationException( "unknown control "+control ); } StubBase( DeliveryService svc, T obj, Pool queued, Pool free ); @SuppressWarnings("unchecked") final boolean sessionMessage( Who sender, Message msg ); Object sessionQuery( Object query ); void sessionControl( Object control, Object value ); void sessionNotify( Object event ); static void sessionNotify( Object obj, Object event );  }### Answer:
@Test public void sessionControl() throws Exception { Object CONTROL = "foo"; Object VALUE = "bar"; assertNull( session.what ); assertNull( session.control ); assertNull( session.value ); stub.sessionControl( CONTROL, VALUE ); assertSame( What.SESSION_CONTROL, session.what ); assertSame( CONTROL, session.control ); assertSame( VALUE, session.value ); }