Exemplo n.º 1
0
  @Test
  public void testDifferentURIs() throws Exception {
    when(toAddressURI.isSipURI()).thenReturn(true);
    when(toAddressURI.getHost()).thenReturn("domain1.org");
    when(requestURI.getHost()).thenReturn("domain2.org");

    testException();
  }
Exemplo n.º 2
0
  @Test
  public void testValidate() throws Exception {
    when(toAddressURI.isSipURI()).thenReturn(true);
    when(toAddressURI.getHost()).thenReturn("domain1.org");
    when(requestURI.getHost()).thenReturn("domain1.org");

    ToHeaderValidator validator = new ToHeaderValidator();
    validator.sipUtils = sipUtils;
    validator.validateRequest(requestEvent);

    assertTrue(true);
  }
Exemplo n.º 3
0
  @Test
  public void testBadAddressUri() throws Exception {
    when(toAddressURI.isSipURI()).thenReturn(false);

    testException();
  }