// Path: dagger-servlet/src/main/java/com/leacox/dagger/servlet/ManagedServletPipeline.java
// public static final String REQUEST_DISPATCHER_REQUEST = "javax.servlet.forward.servlet_path";


import dagger.Module;
import dagger.ObjectGraph;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static com.leacox.dagger.servlet.ManagedServletPipeline.REQUEST_DISPATCHER_REQUEST;
import static org.easymock.EasyMock.*;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;
                filter("/*").through(TestFilter.class);
                filter("*.html").through(TestFilter.class);
                filter("/*").through(TestFilter.class);

                // These filters should never fire
                filter("/index/*").through(TestFilter.class);
                filter("*.jsp").through(TestFilter.class);

                // Bind a servlet
                serve("*.html").with(TestServlet.class);
            }
        };

        ServletContext servletContext = createMock("blah", ServletContext.class);
        contextListener.contextInitialized(new ServletContextEvent(servletContext));
        final ObjectGraph objectGraph = contextListener.getObjectGraph();

        final FilterPipeline pipeline = objectGraph.get(FilterPipeline.class);
        pipeline.initPipeline(null);

        // create ourselves a mock request with test URI
        HttpServletRequest requestMock = control.createMock(HttpServletRequest.class);

        expect(requestMock.getRequestURI())
                .andReturn("/index.html")
                .anyTimes();
        expect(requestMock.getContextPath())
                .andReturn("")
                .anyTimes();

// Path: dagger-servlet/src/main/java/com/leacox/dagger/servlet/ManagedServletPipeline.java
// public static final String REQUEST_DISPATCHER_REQUEST = "javax.servlet.forward.servlet_path";


// Path: dagger-servlet/src/test/java/com/leacox/dagger/servlet/FilterDispatchIntegrationTest.java
import dagger.Module;
import dagger.ObjectGraph;
import org.easymock.EasyMock;
import org.easymock.IMocksControl;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.*;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static com.leacox.dagger.servlet.ManagedServletPipeline.REQUEST_DISPATCHER_REQUEST;
import static org.easymock.EasyMock.*;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

                filter("/*").through(TestFilter.class);
                filter("*.html").through(TestFilter.class);
                filter("/*").through(TestFilter.class);

                // These filters should never fire
                filter("/index/*").through(TestFilter.class);
                filter("*.jsp").through(TestFilter.class);

                // Bind a servlet
                serve("*.html").with(TestServlet.class);
            }
        };

        ServletContext servletContext = createMock("blah", ServletContext.class);
        contextListener.contextInitialized(new ServletContextEvent(servletContext));
        final ObjectGraph objectGraph = contextListener.getObjectGraph();

        final FilterPipeline pipeline = objectGraph.get(FilterPipeline.class);
        pipeline.initPipeline(null);

        // create ourselves a mock request with test URI
        HttpServletRequest requestMock = control.createMock(HttpServletRequest.class);

        expect(requestMock.getRequestURI())
                .andReturn("/index.html")
                .anyTimes();
        expect(requestMock.getContextPath())
                .andReturn("")
                .anyTimes();

        requestMock.setAttribute(REQUEST_DISPATCHER_REQUEST, true);