 
       {[response], nil, inner_server}
     end
-
-    @impl Middleware
-    def process_data(_data, _state, inner_server) do
-      {[], nil, inner_server}
-    end
-
-    @impl Middleware
-    def process_tail(_tail, _state, inner_server) do
-      {[], nil, inner_server}
-    end
-
-    @impl Middleware
-    def process_info(_message, _state, inner_server) do
-      {[], nil, inner_server}
-    end
-  end
-
+  end
+
+  # This test also checks that the default callbacks from `use` macro can be overridden.
   test "middlewares can \"short circuit\" processing (not call through)" do
-    middlewares = [{NoOp, nil}, {AlwaysForbidden, nil}]
+    middlewares = [{TrackStages, nil}, {AlwaysForbidden, nil}]
     stack = make_stack(middlewares, SpyServer, :whatever)
     request = Raxx.request(:GET, "/")
 


    assert {_parts, stack} = Server.handle_head(stack, request)

    assert [{Meddler, [response_body: "foo"]}, {NoOp, {:config, :head}}] ==
             Stack.get_middlewares(stack)

    assert {SpyServer, 1} == Stack.get_server(stack)

    {_parts, stack} = Server.handle_data(stack, "z")

    assert [{Meddler, [response_body: "foo"]}, {NoOp, {:head, :data}}] ==
             Stack.get_middlewares(stack)

    assert {SpyServer, 2} == Stack.get_server(stack)

    {_parts, stack} = Server.handle_data(stack, "zz")

    assert [{Meddler, [response_body: "foo"]}, {NoOp, {:data, :data}}] ==
             Stack.get_middlewares(stack)

    assert {SpyServer, 3} == Stack.get_server(stack)

    {_parts, stack} = Server.handle_tail(stack, [{"x-foo", "bar"}])
    assert [{Meddler, _}, {NoOp, {:data, :tail}}] = Stack.get_middlewares(stack)
    assert {SpyServer, -3} == Stack.get_server(stack)
  end


    use Middleware
  end

  test "Default middleware callbacks leave the request and response unmodified" do
    middlewares = [{DefaultMiddleware, :irrelevant}, {DefaultMiddleware, 42}]
    stack = make_stack(middlewares, HomePage, :controller_initial)

    request =
