HeartbeatExtensionHandler extends ExtensionHandler<HeartbeatExtensionMessage> { @Override public HeartbeatExtensionPreparator getPreparator(HeartbeatExtensionMessage message) { return new HeartbeatExtensionPreparator(context.getChooser(), message, getSerializer(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 testGetPreparator() { assertTrue(handler.getPreparator(new HeartbeatExtensionMessage()) instanceof HeartbeatExtensionPreparator); }