DHClientKeyExchangeHandler extends ClientKeyExchangeHandler<DHClientKeyExchangeMessage> { @Override public DHClientKeyExchangeSerializer getSerializer(DHClientKeyExchangeMessage message) { return new DHClientKeyExchangeSerializer(message, tlsContext.getChooser().getSelectedProtocolVersion()); } DHClientKeyExchangeHandler(TlsContext tlsContext); @Override DHClientKeyExchangeParser getParser(byte[] message, int pointer); @Override DHClientKeyExchangePreparator getPreparator(DHClientKeyExchangeMessage message); @Override DHClientKeyExchangeSerializer getSerializer(DHClientKeyExchangeMessage message); @Override void adjustTLSContext(DHClientKeyExchangeMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new DHClientKeyExchangeMessage()) instanceof DHClientKeyExchangeSerializer); }