@BeforeClass
    public static void setup() {
        http = new SparkTestUtil(4567);

        before("/user", initializeCounter, incrementCounter, loadUser);

        after("/user", incrementCounter, (req, res) -> {
            int counter = req.attribute("counter");
            Assert.assertEquals(counter, 2);
        });

        get("/user", (request, response) -> {
            Assert.assertEquals((int) request.attribute("counter"), 1);
            return ((User) request.attribute("user")).name();
        });

        awaitInitialization();
    }
Basic test to ensure that multiple before and after filters can be mapped to a route.
src/test/java/spark/MultipleFiltersTest.java