()
| 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 { |
no test coverage detected