Add a test middleware