@Test public void testDoesNotGeneratesInvocationId() throws Exception { when(configuration.shouldGenerateInvocationId()).thenReturn(false); final Collection<String> emptyList = Collections.emptyList(); when(httpServletRequest.getHeaders(TraceeConstants.TPIC_HEADER)).thenReturn(enumeration(emptyList)); unit.requestInitialized(wrapToEvent(httpServletRequest)); verify(backend, never()).put(eq(TraceeConstants.INVOCATION_ID_KEY), anyString()); }
@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);  }