MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / sendHello

Method sendHello

test/TestSecureRpcHelper96.java:118–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116 }
117
118 @Test
119 public void sendHello() throws Exception {
120 PowerMockito.doAnswer(new Answer<byte[]>() {
121 @Override
122 public byte[] answer(InvocationOnMock invocation) throws Throwable {
123 return new byte[] { 42 };
124 }
125 }).when(sasl_client).evaluateChallenge(any(byte[].class));
126 helper.sendHello(channel);
127 assertEquals(2, buffers.size());
128 assertArrayEquals(new byte[] { 'H', 'B', 'a', 's', 0, 81 },
129 buffers.get(0).array());
130 assertArrayEquals(new byte[] { 0, 0, 0, 1, 42 },
131 buffers.get(1).array());
132 }
133
134 @Test
135 public void sendHelloNoInitialResponse() throws Exception {

Callers 4

sendHelloNoSaslMethod · 0.45

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected