}
@Test
public void testBug53339() throws Exception {
Tomcat tomcat = getTomcatInstance();
tomcat.enableNaming();
// Must have a real docBase - just use temp
Context ctx =
tomcat.addContext("", System.getProperty("java.io.tmpdir"));
Tomcat.addServlet(ctx, "Bug53339", new Bug53339Servlet());
ctx.addServletMapping("/*", "Bug53339");
// Create the resource
ContextEnvironment env = new ContextEnvironment();
env.setName(Bug53339WsInbound.JNDI_NAME);
env.setType(String.class.getName());
env.setValue(Bug53339WsInbound.TEST_MESSAGE);
ctx.getNamingResources().addEnvironment(env);
tomcat.start();
WebSocketClient client= new WebSocketClient(getPort());
// Send the WebSocket handshake
client.writer.write("GET / HTTP/1.1" + CRLF);