public void testPassivation() throws Exception {
MockExternalContext externalContext = new MockExternalContext();
ExternalContextHolder.setExternalContext(externalContext);
Conversation conversation = conversationManager.beginConversation(new ConversationParameters("test", "test",
"test"));
conversation.lock();
conversation.putAttribute("testAttribute", "testValue");
ConversationId conversationId = conversation.getId();
ExternalContextHolder.setExternalContext(null);
// simulate write out of session
byte[] passiveSession = passivate(externalContext.getSessionMap());