public void testContextClose() throws Exception {
MessageFactory messageFactory = MessageFactory.newInstance();
int port = FreePortScanner.getFreePort();
Server jettyServer = new Server(port);
Context jettyContext = new Context(jettyServer, "/");
jettyContext.addServlet(new ServletHolder(new EchoServlet()), "/");
jettyServer.start();
WebServiceConnection connection = null;
try {
StaticApplicationContext appContext = new StaticApplicationContext();