ChangeCipherSpecSerializer extends ProtocolMessageSerializer<ChangeCipherSpecMessage> { @Override public byte[] serializeProtocolMessageContent() { LOGGER.debug("Serializing ChangeCipherSepcMessage"); writeCcsProtocolType(msg); return getAlreadySerialized(); } ChangeCipherSpecSerializer(ChangeCipherSpecMessage message, ProtocolVersion version); @Override byte[] serializeProtocolMessageContent();  }
@Test public void testSerializeProtocolMessageContent() { ChangeCipherSpecMessage msg = new ChangeCipherSpecMessage(); msg.setCcsProtocolType(ccsType); msg.setCompleteResultingMessage(expectedPart); ChangeCipherSpecSerializer serializer = new ChangeCipherSpecSerializer(msg, version); assertArrayEquals(expectedPart, serializer.serialize()); }