HelloRequestSerializer extends HandshakeMessageSerializer<HelloRequestMessage> { @Override public byte[] serializeHandshakeMessageContent() { LOGGER.debug("Serializing HelloRequestMessage"); return getAlreadySerialized(); } HelloRequestSerializer(HelloRequestMessage message, ProtocolVersion version); @Override byte[] serializeHandshakeMessageContent();  }
@Test public void testSerializeHandshakeMessageContent() { HelloRequestMessage msg = new HelloRequestMessage(); msg.setCompleteResultingMessage(expectedPart); msg.setLength(length); msg.setType(type.getValue()); HelloRequestSerializer serializer = new HelloRequestSerializer(msg, ProtocolVersion.TLS12); assertArrayEquals(expectedPart, serializer.serialize()); }