HeartbeatMessageHandler extends ProtocolMessageHandler<HeartbeatMessage> { @Override public HeartbeatMessagePreparator getPreparator(HeartbeatMessage message) { return new HeartbeatMessagePreparator(tlsContext.getChooser(), message); } HeartbeatMessageHandler(TlsContext tlsContext); @Override HeartbeatMessageParser getParser(byte[] message, int pointer); @Override HeartbeatMessagePreparator getPreparator(HeartbeatMessage message); @Override HeartbeatMessageSerializer getSerializer(HeartbeatMessage message); @Override void adjustTLSContext(HeartbeatMessage message);  }
@Test public void testGetPreparator() { assertTrue(handler.getPreparator(new HeartbeatMessage()) instanceof HeartbeatMessagePreparator); }