JVoiceXmlImplementationPlatform implements SpokenInputListener, SynthesizedOutputListener,
        TelephonyListener, ImplementationPlatform, Configurable { @Override public CallControl getCallControl() throws NoresourceError, ConnectionDisconnectHangupEvent { synchronized (this) { if (hungup) { throw new ConnectionDisconnectHangupEvent("caller hung up"); } if (closed) { throw new NoresourceError("implementation platform closed"); } } final String type = info.getCallControl(); synchronized (telephonyPoolLock) { if (call == null) { final Telephony telephony = getExternalResourceFromPool( telephonyPool, type); telephony.addListener(this); call = new JVoiceXmlCallControl(telephony); LOGGER.info("borrowed call control of type '" + type + "'"); } return call; } } JVoiceXmlImplementationPlatform(
            final KeyedResourcePool<Telephony> telePool,
            final KeyedResourcePool<SynthesizedOutput> synthesizedOutputPool,
            final KeyedResourcePool<SpokenInput> spokenInputPool,
            final ConnectionInformation connectionInformation);   JVoiceXmlImplementationPlatform(
            final KeyedResourcePool<Telephony> telePool,
            final KeyedResourcePool<SynthesizedOutput> synthesizedOutputPool,
            final KeyedResourcePool<SpokenInput> spokenInputPool,
            final BufferedDtmfInput bufferedCharacterInput,
            final ConnectionInformation connectionInformation); @Override void init(final Configuration configuration); Session getSession(); @Override boolean isHungup(); @Override SystemOutput getSystemOutput(); @Override void waitOutputQueueEmpty(); void waitNonBargeInPlayed(); @Override UserInput getUserInput(); @Override boolean isUserInputActive(); @Override DtmfInput getCharacterInput(); @Override CallControl getCallControl(); @Override void close(); @Override void setEventBus(final EventBus bus); void resultAccepted(final RecognitionResult result); void resultRejected(final RecognitionResult result); @Override void inputStatusChanged(final SpokenInputEvent event); @Override void telephonyCallAnswered(final TelephonyEvent event); @Override void dtmfInput(final char dtmf); @Override void telephonyCallHungup(final TelephonyEvent event); void telephonyCallTransferred(final TelephonyEvent event); @Override void telephonyMediaEvent(final TelephonyEvent event); @Override void outputStatusChanged(final SynthesizedOutputEvent event); void setSession(final Session currentSession); @Override void outputError(final ErrorEvent error); @Override void inputError(final ErrorEvent error); @Override void telephonyError(final ErrorEvent error); @Override void startPromptQueuing(final long timeout); @Override void queuePrompt(final SpeakableText speakable); @Override void renderPrompts(final String sessionId,
            final DocumentServer server, final CallControlProperties props);  }
@Test public void testGetCallControl() throws Exception, JVoiceXMLEvent { final CallControl call1 = platform.getCallControl(); Assert.assertNotNull(call1); final CallControl call2 = platform.getCallControl(); Assert.assertNotNull(call2); Assert.assertEquals(call1, call2); }