@Before public void setUp() throws Exception { when(requestEvent.getRequest()).thenReturn(request); when(request.getHeader(ToHeader.NAME)).thenReturn(toHeader); when(toHeader.getAddress()).thenReturn(toAddress); when(toAddress.getURI()).thenReturn(toAddressURI); when(sipUtils.getCanonicalizedURI(toAddressURI)).thenReturn(toAddressURI); when(request.getRequestURI()).thenReturn(requestURI); when(sipUtils.getCanonicalizedURI(requestURI)).thenReturn(requestURI); }
@Override public void processRequest(RequestEvent requestEvent) { String requestMethod = sipUtils.getRequestMethod(requestEvent); requestHandlersMap.get(upperCase(requestMethod)).processEvent(requestEvent); }