예제 #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();
  }
예제 #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);
  }
예제 #3
0
  @Test
  public void testBadAddressUri() throws Exception {
    when(toAddressURI.isSipURI()).thenReturn(false);

    testException();
  }