PskServerKeyExchangeHandler extends ServerKeyExchangeHandler<PskServerKeyExchangeMessage> { @Override public PskServerKeyExchangePreparator getPreparator(PskServerKeyExchangeMessage message) { return new PskServerKeyExchangePreparator(tlsContext.getChooser(), message); } 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 testGetPreparator() { assertTrue(handler.getPreparator(new PskServerKeyExchangeMessage()) instanceof PskServerKeyExchangePreparator); }