SynthesizerDelegate sd = new SynthesizerDelegate(ss);
ss.startSpeakingString("Status check number two");
sd.waitForNextWord(1000);
ss.pauseSpeakingAtBoundary(NSSpeechSynthesizer.NSSpeechBoundary.WordBoundary);
Thread.sleep(1000); //this API is very asynchronous ... need to sleep before polling status
NSSpeechStatus status = ss.getStatus();
assertFalse("Output should not be busy", status.isOutputBusy());
assertTrue("Output should be paused", status.isOutputPaused());
assertEquals("Check number of characters left failed", 16, status.getNumberOfCharactersLeft());
ss.continueSpeaking();
sd.waitForNextWord(2500);
ss.pauseSpeakingAtBoundary(NSSpeechSynthesizer.NSSpeechBoundary.ImmediateBoundary);
Thread.sleep(TIME_TO_WAIT);
status = ss.getStatus();
assertFalse("Output should not be busy", status.isOutputBusy());
assertTrue("Output should be paused", status.isOutputPaused());
assertEquals("Check number of characters left failed", 10, status.getNumberOfCharactersLeft());
ss.continueSpeaking();
sd.waitForSpeechDone(TIME_TO_WAIT, true);
}