Add tests for the `load` middleware