JlibRtpMediaLocatorFactory implements OutputMediaLocatorFactory, InputMediaLocatorFactory { public URI getSourceMediaLocator(final SynthesizedOutput output) throws URISyntaxException { return getSourceMediaLocator(); }  void setHost(final String name); void setPort(final long value); void setPacketsPerSecond(final long packets); void setKeepAlive(final boolean on); void setParticipant(final String name); void setSigned(final boolean on); void setEncoding(final String enc); void setRate(final long value); void setBits(final long value); void setChannels(final long number); void setEndian(final String value); URI getSourceMediaLocator(final SynthesizedOutput output); @Override URI getSourceMediaLocator(final SpokenInput input); URI getSinkMediaLocator(final SynthesizedOutput output,
            final URI sourceLocator); @Override URI getSinkMediaLocator(final SpokenInput input,
            final URI sourceLocator);  }
@Test public void testGetSourceMediaLocator() throws Exception { final JlibRtpMediaLocatorFactory factory = new JlibRtpMediaLocatorFactory(); factory.setPort(30000); final SynthesizedOutput output = new MockSynthesizedOutput(); final URI locator1 = factory.getSourceMediaLocator(output); Assert.assertEquals(new URI("rtp: + "participant=localhost&keepAlive=false&signed=false"), locator1); final URI locator2 = factory.getSourceMediaLocator(output); Assert.assertEquals(new URI("rtp: + "participant=localhost&keepAlive=false&signed=false"), locator2); factory.setParticipant("127.0.0.1"); factory.setChannels(2); final URI locator3 = factory.getSourceMediaLocator(output); Assert.assertEquals(new URI("rtp: + "participant=127.0.0.1&channels=2&keepAlive=false" + "&signed=false"), locator3); }