HeartbeatExtensionHandler extends ExtensionHandler<HeartbeatExtensionMessage> { @Override public HeartbeatExtensionSerializer getSerializer(HeartbeatExtensionMessage message) { return new HeartbeatExtensionSerializer(message); } HeartbeatExtensionHandler(TlsContext context); @Override void adjustTLSExtensionContext(HeartbeatExtensionMessage message); @Override HeartbeatExtensionParser getParser(byte[] message, int pointer); @Override HeartbeatExtensionPreparator getPreparator(HeartbeatExtensionMessage message); @Override HeartbeatExtensionSerializer getSerializer(HeartbeatExtensionMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new HeartbeatExtensionMessage()) instanceof HeartbeatExtensionSerializer); }