PskDhClientKeyExchangeHandler extends ClientKeyExchangeHandler<PskDhClientKeyExchangeMessage> { @Override public PskDhClientKeyExchangeSerializer getSerializer(PskDhClientKeyExchangeMessage message) { return new PskDhClientKeyExchangeSerializer(message, tlsContext.getChooser().getSelectedProtocolVersion()); } PskDhClientKeyExchangeHandler(TlsContext tlsContext); @Override PskDhClientKeyExchangeParser getParser(byte[] message, int pointer); @Override PskDhClientKeyExchangePreparator getPreparator(PskDhClientKeyExchangeMessage message); @Override PskDhClientKeyExchangeSerializer getSerializer(PskDhClientKeyExchangeMessage message); @Override void adjustTLSContext(PskDhClientKeyExchangeMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new PskDhClientKeyExchangeMessage()) instanceof PskDhClientKeyExchangeSerializer); }