@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://localhost:30000/audio?"
            + "participant=localhost&keepAlive=false&signed=false"),
            locator1);
    final URI locator2 = factory.getSourceMediaLocator(output);
    Assert.assertEquals(new URI("rtp://localhost:30002/audio?"
            + "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://localhost:30004/audio?"
            + "participant=127.0.0.1&channels=2&keepAlive=false"
            + "&signed=false"),
            locator3);
}