HeartbeatExtensionHandler extends ExtensionHandler<HeartbeatExtensionMessage> { @Override public HeartbeatExtensionParser getParser(byte[] message, int pointer) { return new HeartbeatExtensionParser(pointer, 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 testGetParser() { assertTrue(handler.getParser(new byte[] { 0, 1, 2, }, 0) instanceof HeartbeatExtensionParser); }