HelloVerifyRequestHandler extends HandshakeMessageHandler<HelloVerifyRequestMessage> { @Override public void adjustTLSContext(HelloVerifyRequestMessage message) { adjustDTLSCookie(message); } HelloVerifyRequestHandler(TlsContext tlsContext); @Override HelloVerifyRequestParser getParser(byte[] message, int pointer); @Override HelloVerifyRequestPreparator getPreparator(HelloVerifyRequestMessage message); @Override HelloVerifyRequestSerializer getSerializer(HelloVerifyRequestMessage message); @Override void adjustTLSContext(HelloVerifyRequestMessage message);  }
@Test public void testAdjustTLSContext() { HelloVerifyRequestMessage message = new HelloVerifyRequestMessage(); message.setCookie(new byte[] { 0, 1, 2, 3 }); handler.adjustTLSContext(message); assertArrayEquals(new byte[] { 0, 1, 2, 3 }, context.getDtlsCookie()); }