class NSSpeechSynthesizer extends NSObject {

    public NSSpeechStatus getStatus() {
        return new NSSpeechStatus(Rococoa.cast(getProperty(SpeechProperty.StatusProperty), NSMutableDictionary.class));
    }

}

class NSSpeechSynthesizerTest {

    private static final int TIME_TO_WAIT;
    private NSAutoreleasePool pool;

    @Test
    public void testGetStatus() {

        NSSpeechSynthesizer ss = NSSpeechSynthesizer.synthesizerWithVoice(null);
        SynthesizerDelegate sd = new SynthesizerDelegate(ss);        
        NSSpeechStatus status = ss.getStatus();
        assertEquals(status.isOutputBusy(), ss.isSpeaking());
        assertFalse(status.isOutputPaused());
        assertEquals("Should have no characters left", 0, status.getNumberOfCharactersLeft());
        assertEquals(0, status.getPhonemeCode());
        
        ss.startSpeakingString("Status check");
        status = ss.getStatus();
        assertEquals(status.isOutputBusy(), ss.isSpeaking());
        assertFalse(status.isOutputPaused());
        assertTrue("Should have characters left", status.getNumberOfCharactersLeft() > 0);
        //assertTrue("Opcode should not be zero", status.getPhonemeCode() != 0); always zero... seems to have word granularity
        sd.waitForSpeechDone(TIME_TO_WAIT, true);
    }

}