Updated middleware documentation.
Fixed integration test.