public void testShutdownOfTimer() throws Exception {
a=createSharedChannel(SINGLETON_1);
b=createSharedChannel(SINGLETON_1);
a.connect("x");
b.connect("y");
TimeScheduler timer1=a.getProtocolStack().getTransport().getTimer();
TimeScheduler timer2=b.getProtocolStack().getTransport().getTimer();
assert timer1 == timer2;
assert !timer1.isShutdown();
assert !timer2.isShutdown();
Util.sleep(500);
b.close();
assert !timer2.isShutdown();
assert !timer1.isShutdown();
a.close(); // now, reference counting reaches 0, so the timer thread pool is stopped
assert timer2.isShutdown();
assert timer1.isShutdown();
}