Conversation { public void begin() { if (currentPrompt == null) { abandoned = false; currentPrompt = firstPrompt; context.getForWhom().beginConversation(this); } } Conversation(Plugin plugin, Conversable forWhom, Prompt firstPrompt);  Conversation(Plugin plugin, Conversable forWhom, Prompt firstPrompt, Map<Object, Object> initialSessionData); Conversable getForWhom(); boolean isModal(); boolean isLocalEchoEnabled(); void setLocalEchoEnabled(boolean localEchoEnabled); ConversationPrefix getPrefix(); List<ConversationCanceller> getCancellers(); ConversationContext getContext(); void begin(); ConversationState getState(); void acceptInput(String input); synchronized void addConversationAbandonedListener(ConversationAbandonedListener listener); synchronized void removeConversationAbandonedListener(ConversationAbandonedListener listener); void abandon(); synchronized void abandon(ConversationAbandonedEvent details); void outputNextPrompt();  }
@Test public void testNotPlayer() { FakeConversable forWhom = new FakeConversable(); NullConversationPrefix prefix = new NullConversationPrefix(); ConversationFactory factory = new ConversationFactory(null) .thatExcludesNonPlayersWithMessage("bye"); Conversation conversation = factory.buildConversation(forWhom); conversation.begin(); assertEquals("bye", forWhom.lastSentMessage); assertEquals(conversation, forWhom.begunConversation); assertEquals(conversation, forWhom.abandonedConverstion); }