SpeakableSsmlText implements SpeakableText { public boolean isSpeakableTextEmpty() { if (document == null) { return true; } final Speak speak = document.getSpeak(); return !speak.hasChildNodes(); } SpeakableSsmlText(final String text, final Locale locale);  SpeakableSsmlText(final SsmlDocument doc);  SpeakableSsmlText(final SsmlDocument doc, final boolean useBargein,
            final BargeInType type); String getSpeakableText(); SsmlDocument getDocument(); SpeakableText appendSpeakableText(final String str); boolean isSpeakableTextEmpty(); @Override boolean isBargeInEnabled(final BargeInType type); BargeInType getBargeInType(); long getTimeout(); void setTimeout(final long msec); @Override boolean equals(final Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testIsSpeakableTextEmpty() throws Exception { final SsmlDocument simple = new SsmlDocument(); final SpeakableSsmlText simpleSpeakable = new SpeakableSsmlText(simple); Assert.assertTrue(simpleSpeakable.isSpeakableTextEmpty()); simpleSpeakable.appendSpeakableText("some text"); Assert.assertFalse(simpleSpeakable.isSpeakableTextEmpty()); final SpeakableSsmlText emptySpeakable = new SpeakableSsmlText((SsmlDocument)null); Assert.assertTrue(emptySpeakable.isSpeakableTextEmpty()); emptySpeakable.appendSpeakableText("some text"); Assert.assertTrue(emptySpeakable.isSpeakableTextEmpty()); }