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