@Override
  public void setUp() {
    LocalizationContext lc = createNiceMock(LocalizationContext.class);
    replay(lc);

    m_out = new ExchangeMediaServer();
    m_out.setHostname(HOSTNAME);
    m_out.setServerExtension(VOICEMAIL_EXTENSION);
    m_out.setLocalizationContext(lc);
  }
  public void testBuildVoicemailDepositUrl() {
    String uri = m_out.buildVoicemailDepositUrl("q=0.1");
    assertEquals(
        "<sip:[email protected];transport=tcp?Diversion=%3Csip:{vdigits}%40{host}%3E%3Breason%3Dno-answer%3Bscreen%3Dno%3Bprivacy%3Doff>;q=0.1",
        uri);

    uri = m_out.buildVoicemailDepositUrl(null);
    assertEquals(
        "<sip:[email protected];transport=tcp?Diversion=%3Csip:{vdigits}%40{host}%3E%3Breason%3Dno-answer%3Bscreen%3Dno%3Bprivacy%3Doff>",
        uri);
  }
 public void testGetAddress() {
   assertEquals("Wrong server address.", HOSTNAME, m_out.getHostname());
 }
 public void testBuildVoicemailRetrieveUrl() {
   String uri = m_out.buildVoicemailRetrieveUrl();
   assertEquals("<sip:[email protected];transport=tcp>", uri);
 }
 public void testConstructorWithArgs() {
   ExchangeMediaServer out = new ExchangeMediaServer(HOSTNAME, VOICEMAIL_EXTENSION);
   assertEquals("Wrong value for hostname.", HOSTNAME, out.getHostname());
   assertEquals("Wrong value for extension.", VOICEMAIL_EXTENSION, out.getServerExtension());
 }