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