MCPcopy
hub / github.com/OpenTSDB/opentsdb / sendReplyStatusBytes

Method sendReplyStatusBytes

test/tsd/TestHttpQuery.java:1041–1048  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1039 }
1040
1041 @Test
1042 public void sendReplyStatusBytes() throws Exception {
1043 HttpQuery query = NettyMocks.getQuery(tsdb, "/");
1044 query.sendReply(HttpResponseStatus.CREATED, "Hello World".getBytes());
1045 assertEquals(HttpResponseStatus.CREATED, query.response().getStatus());
1046 assertEquals("Hello World",
1047 query.response().getContent().toString(Charset.forName("UTF-8")));
1048 }
1049
1050 @Test (expected = NullPointerException.class)
1051 public void sendReplyStatusBytesNullStatus() throws Exception {

Callers

nothing calls this directly

Calls 7

getQueryMethod · 0.95
sendReplyMethod · 0.95
responseMethod · 0.80
getStatusMethod · 0.65
getBytesMethod · 0.45
toStringMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected