use of org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayload in project spring-boot by spring-projects.
the class HttpTunnelServerTests method httpConnectionRespondWithPayload.
@Test
public void httpConnectionRespondWithPayload() throws Exception {
HttpConnection connection = new HttpConnection(this.request, this.response);
connection.waitForResponse();
connection.respond(new HttpTunnelPayload(1, ByteBuffer.wrap("hello".getBytes())));
assertThat(this.servletResponse.getStatus()).isEqualTo(200);
assertThat(this.servletResponse.getContentAsString()).isEqualTo("hello");
assertThat(this.servletResponse.getHeader(SEQ_HEADER)).isEqualTo("1");
}
Aggregations