KeyShareExtensionHandler extends ExtensionHandler<KeyShareExtensionMessage> { @Override public KeyShareExtensionSerializer getSerializer(KeyShareExtensionMessage message) { return new KeyShareExtensionSerializer(message, context.getChooser().getConnectionEndType()); } 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 testGetSerializer() { assertTrue(handler.getSerializer(new KeyShareExtensionMessage()) instanceof KeyShareExtensionSerializer); }