KeyShareExtensionHandler extends ExtensionHandler<KeyShareExtensionMessage> { @Override public KeyShareExtensionPreparator getPreparator(KeyShareExtensionMessage message) { return new KeyShareExtensionPreparator(context.getChooser(), message, getSerializer(message)); } KeyShareExtensionHandler(TlsContext context, ExtensionType type); @Override KeyShareExtensionParser getParser(byte[] message, int pointer); @Override KeyShareExtensionPreparator getPreparator(KeyShareExtensionMessage message); @Override KeyShareExtensionSerializer getSerializer(KeyShareExtensionMessage message); @Override void adjustTLSExtensionContext(KeyShareExtensionMessage message);  }
@Test public void testGetPreparator() { assertTrue(handler.getPreparator(new KeyShareExtensionMessage()) instanceof KeyShareExtensionPreparator); }