### Question:
TranscoderService { static byte[] serializeSessionFields( final MemcachedBackupSession session ) { return serializeSessionFields(session, VERSION_2); } TranscoderService( final SessionAttributesTranscoder attributesTranscoder ); byte[] serialize( final MemcachedBackupSession session ); MemcachedBackupSession deserialize( final byte[] data, final SessionManager manager ); byte[] serializeAttributes( final MemcachedBackupSession session, final ConcurrentMap<String, Object> attributes ); ConcurrentMap<String, Object> deserializeAttributes(final byte[] data ); byte[] serialize( final MemcachedBackupSession session, final byte[] attributesData ); static int encodeNum( final long num, final byte[] data, final int beginIndex, final int maxBytes ); static long decodeNum( final byte[] data, final int beginIndex, final int numBytes ); static final short VERSION_1; static final short VERSION_2; }### Answer:
@Test public void testSerializeSessionFields() { final MemcachedBackupSession session = (MemcachedBackupSession) _manager.createSession( null ); session.setLastBackupTime( System.currentTimeMillis() ); final byte[] data = TranscoderService.serializeSessionFields( session ); final MemcachedBackupSession deserialized = TranscoderService.deserializeSessionFields(data, _manager ).getSession(); assertSessionFields( session, deserialized ); }