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