PskDheServerKeyExchangeHandler extends ServerKeyExchangeHandler<PskDheServerKeyExchangeMessage> { @Override public PskDheServerKeyExchangeSerializer getSerializer(PskDheServerKeyExchangeMessage message) { return new PskDheServerKeyExchangeSerializer(message, tlsContext.getChooser().getSelectedProtocolVersion()); } PskDheServerKeyExchangeHandler(TlsContext tlsContext); @Override PskDheServerKeyExchangeParser getParser(byte[] message, int pointer); @Override PskDheServerKeyExchangePreparator getPreparator(PskDheServerKeyExchangeMessage message); @Override PskDheServerKeyExchangeSerializer getSerializer(PskDheServerKeyExchangeMessage message); @Override void adjustTLSContext(PskDheServerKeyExchangeMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new PskDheServerKeyExchangeMessage()) instanceof PskDheServerKeyExchangeSerializer); }