ApplicationMessageHandler extends ProtocolMessageHandler<ApplicationMessage> { @Override public ApplicationMessageSerializer getSerializer(ApplicationMessage message) { return new ApplicationMessageSerializer(message, tlsContext.getChooser().getSelectedProtocolVersion()); } ApplicationMessageHandler(TlsContext tlsContext); @Override ApplicationMessageParser getParser(byte[] message, int pointer); @Override ApplicationMessagePreparator getPreparator(ApplicationMessage message); @Override ApplicationMessageSerializer getSerializer(ApplicationMessage message); @Override void adjustTLSContext(ApplicationMessage message);  }
@Test public void testGetSerializer() { assertTrue(handler.getSerializer(new ApplicationMessage()) instanceof ApplicationMessageSerializer); }