@Test
public void jsessionIdCookieTestXhr() throws Exception {
assertSetCookie(Transports.Type.XHR.path());
final String serviceName = "/cookie_needed_echo";
final SockJsConfig config = SockJsConfig.withPrefix(serviceName).cookiesNeeded().build();
final EmbeddedChannel ch = channelForService(echoService(config));
removeLastInboundMessageHandlers(ch);
final String sessionUrl = serviceName + "/abc/" + UUID.randomUUID().toString();
final FullHttpRequest request = httpRequest(sessionUrl + Transports.Type.XHR.path(), GET);
request.headers().set("Cookie", ClientCookieEncoder.encode("JSESSIONID", "abcdef"));