}
public void testMaxConversations() {
conversationManager.setMaxConversations(2);
ExternalContextHolder.setExternalContext(new MockExternalContext());
Conversation conversation1 = conversationManager.beginConversation(new ConversationParameters("test", "test",
"test"));
conversation1.lock();
assertNotNull(conversationManager.getConversation(conversation1.getId()));
Conversation conversation2 = conversationManager.beginConversation(new ConversationParameters("test", "test",
"test"));
assertNotNull(conversationManager.getConversation(conversation1.getId()));
assertNotNull(conversationManager.getConversation(conversation2.getId()));
Conversation conversation3 = conversationManager.beginConversation(new ConversationParameters("test", "test",
"test"));
try {
conversation1.end();
conversation1.unlock();
conversationManager.getConversation(conversation1.getId());