@Test
public void testRun() throws Exception, JVoiceXMLEvent {

    final MarcSynthesizedOutput output = new MarcSynthesizedOutput();
    output.connect(null);
    output.addListener(this);
    final SpeakableText speakable = new SpeakableSsmlText("test",
            Locale.US);
    final String sessionId = UUID.randomUUID().toString();
    output.queueSpeakable(speakable, sessionId, null);
    final MarcFeedback feedback = new MarcFeedback(output, 4011);
    final DatagramSocket server = new DatagramSocket(4012);
    feedback.start();
    Thread.sleep(1000);
    final String msg = "<event id=\"JVoiceXMLTrack:end\"/>";
    final byte[] buf = msg.getBytes();
    final InetAddress address = Inet4Address.getLocalHost();
    final DatagramPacket packet = new DatagramPacket(buf, buf.length,
            address, 4011);
    server.send(packet);
    final String msg2 = "<event id=\"SpeechCommand:end\"/>";
    final byte[] buf2 = msg2.getBytes();
    final DatagramPacket packet2 = new DatagramPacket(buf2, buf2.length,
            address, 4011);
    server.send(packet2);
    synchronized (lock) {
        lock.wait();
    }
    Assert.assertTrue(event instanceof OutputEndedEvent);
    final OutputEndedEvent endedEvent = (OutputEndedEvent) event;
    Assert.assertEquals(speakable, endedEvent.getSpeakable());
}