@Test public void testAcceptIncomingInvocationId() throws Exception { when(configuration.shouldGenerateInvocationId()).thenReturn(false); when(configuration.shouldProcessContext(IncomingRequest)).thenReturn(true); when(configuration.filterDeniedParams(anyMapOf(String.class, String.class), any(TraceeFilterConfiguration.Channel.class))).thenAnswer(new Answer<Object>() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { return invocation.getArguments()[0]; } }); when(httpServletRequest.getHeaders(TraceeConstants.TPIC_HEADER)).thenReturn(enumeration( singletonList(INVOCATION_ID_KEY + "=123"))); unit.requestInitialized(wrapToEvent(httpServletRequest)); verify(backend, atLeastOnce()).putAll(Mockito.eq(new HashMap<String, String>() {{ put(INVOCATION_ID_KEY, "123"); }})); }
@Override public void requestInitialized(final ServletRequestEvent sre) { final ServletRequest servletRequest = sre.getServletRequest(); if (servletRequest instanceof HttpServletRequest) { httpRequestInitialized((HttpServletRequest) servletRequest); } }
TraceeServletRequestListener implements ServletRequestListener { @Override public void requestInitialized(final ServletRequestEvent sre) { final ServletRequest servletRequest = sre.getServletRequest(); if (servletRequest instanceof HttpServletRequest) { httpRequestInitialized((HttpServletRequest) servletRequest); } } }
TraceeServletRequestListener implements ServletRequestListener { @Override public void requestInitialized(final ServletRequestEvent sre) { final ServletRequest servletRequest = sre.getServletRequest(); if (servletRequest instanceof HttpServletRequest) { httpRequestInitialized((HttpServletRequest) servletRequest); } } protected  TraceeServletRequestListener(TraceeBackend backend, HttpHeaderTransport transportSerialization);  TraceeServletRequestListener(); }
TraceeServletRequestListener implements ServletRequestListener { @Override public void requestInitialized(final ServletRequestEvent sre) { final ServletRequest servletRequest = sre.getServletRequest(); if (servletRequest instanceof HttpServletRequest) { httpRequestInitialized((HttpServletRequest) servletRequest); } } protected  TraceeServletRequestListener(TraceeBackend backend, HttpHeaderTransport transportSerialization);  TraceeServletRequestListener(); @Override void requestDestroyed(final ServletRequestEvent sre); @Override void requestInitialized(final ServletRequestEvent sre); }
TraceeServletRequestListener implements ServletRequestListener { @Override public void requestInitialized(final ServletRequestEvent sre) { final ServletRequest servletRequest = sre.getServletRequest(); if (servletRequest instanceof HttpServletRequest) { httpRequestInitialized((HttpServletRequest) servletRequest); } } protected  TraceeServletRequestListener(TraceeBackend backend, HttpHeaderTransport transportSerialization);  TraceeServletRequestListener(); @Override void requestDestroyed(final ServletRequestEvent sre); @Override void requestInitialized(final ServletRequestEvent sre);  }