JVoiceXmlPromptAccumulator implements PromptAccumulator { public SpeakableText getLastSpeakableText() { final int size = prompts.size(); if (size == 0) { return null; } return prompts.get(size - 1); } JVoiceXmlPromptAccumulator(
            final ImplementationPlatform implementationPlatform); @Override void startPromptQueuing(final long promptTimeout); long getPromptTimeout(); @Override void queuePrompt(final SpeakableText speakable); SpeakableText getLastSpeakableText(); @Override void renderPrompts(final String sessionId,
            final DocumentServer server, final CallControlProperties callProps);  }
@Test public void testGetLastSpeakableText() throws Exception { Assert.assertNull(accumulator.getLastSpeakableText()); final SsmlDocument ssml1 = new SsmlDocument(); final Speak speak1 = ssml1.getSpeak(); speak1.addText("this is a test"); final SpeakableText speakable1 = new SpeakableSsmlText(ssml1); accumulator.queuePrompt(speakable1); Assert.assertEquals(speakable1, accumulator.getLastSpeakableText()); final SsmlDocument ssml2 = new SsmlDocument(); final Speak speak2 = ssml2.getSpeak(); speak2.addText("this is another test"); final SpeakableText speakable2 = new SpeakableSsmlText(ssml2); accumulator.queuePrompt(speakable2); Assert.assertEquals(speakable2, accumulator.getLastSpeakableText()); }