PskServerKeyExchangeHandler extends ServerKeyExchangeHandler<PskServerKeyExchangeMessage> { @Override public PskServerKeyExchangeSerializer getSerializer(PskServerKeyExchangeMessage message) { return new PskServerKeyExchangeSerializer(message, tlsContext.getChooser().getSelectedProtocolVersion()); } PskServerKeyExchangeHandler(TlsContext tlsContext); @Override PskServerKeyExchangeParser getParser(byte[] message, int pointer); @Override PskServerKeyExchangePreparator getPreparator(PskServerKeyExchangeMessage message); @Override PskServerKeyExchangeSerializer getSerializer(PskServerKeyExchangeMessage message); @Override void adjustTLSContext(PskServerKeyExchangeMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new PskServerKeyExchangeMessage()) instanceof PskServerKeyExchangeSerializer); }