@Test
public void flush() {
final SockJsConfig config = SockJsConfig.withPrefix("/test").cookiesNeeded().build();
final XhrPollingTransport transport = new XhrPollingTransport(config, request("", HttpVersion.HTTP_1_1));
final EmbeddedChannel channel = new EmbeddedChannel(transport);
channel.writeOutbound(new OpenFrame());
final FullHttpResponse response = channel.readOutbound();
assertThat(response.getStatus(), equalTo(HttpResponseStatus.OK));
assertThat(response.content().toString(CharsetUtil.UTF_8), equalTo("o" + '\n'));
assertThat(response.getProtocolVersion(), equalTo(HttpVersion.HTTP_1_1));
SockJsTestUtil.verifyDefaultResponseHeaders(response, Transports.CONTENT_TYPE_JAVASCRIPT);