@@ -0,0 +1,1372 @@
+package org.stagemonitor.web.monitor.filter;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport javax.servlet.Filter;%0A%0Aimport org.junit.Test;%0Aimport org.springframework.mock.web.MockFilterChain;%0Aimport org.springframework.mock.web.MockHttpServletRequest;%0Aimport org.springframework.mock.web.MockHttpServletResponse;%0Aimport org.springframework.web.filter.CompositeFilter;%0Aimport org.stagemonitor.requestmonitor.profiler.CallStackElement;%0Aimport org.stagemonitor.requestmonitor.profiler.Profiler;%0A%0Apublic class FilterProfilingTransformerTest %7B%0A%0A%09@Test%0A%09public void testProfileServlet() throws Exception %7B%0A%09%09Filter filter = new CompositeFilter();%0A%0A%09%09final CallStackElement total = Profiler.activateProfiling(%22total%22);%0A%09%09filter.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(), new MockFilterChain());%0A%09%09Profiler.stop();%0A%0A%09%09final CallStackElement serviceCall = total.getChildren().iterator().next();%0A%09%09assertEquals(%22CompositeFilter#doFilter%22, serviceCall.getShortSignature());%0A%09%7D%0A%0A%09@Test%0A%09public void testDontProfileStagemonitorServlet() throws Exception %7B%0A%09%09Filter filter = new HttpRequestMonitorFilter();%0A%0A%09%09final CallStackElement total = Profiler.activateProfiling(%22total%22);%0A%09%09filter.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(), new MockFilterChain());%0A%09%09Profiler.stop();%0A%0A%09%09assertEquals(0, total.getChildren().size());%0A%09%7D%0A%0A%7D

Test FilterProfilingTransformer