connector = service.addConnector("tcp://localhost:0");
return service;
}
protected void tearDown() throws Exception {
TcpTransport t = (TcpTransport) connection.getTransport().narrow(TcpTransport.class);
t.getTransportListener().onException(new IOException("Disposed."));
connection.getTransport().stop();
super.tearDown();
}