@Test public void testDifferentURIs() throws Exception { when(toAddressURI.isSipURI()).thenReturn(true); when(toAddressURI.getHost()).thenReturn("domain1.org"); when(requestURI.getHost()).thenReturn("domain2.org"); testException(); }
@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); }
@Test public void testBadAddressUri() throws Exception { when(toAddressURI.isSipURI()).thenReturn(false); testException(); }