Unit test on endpointMatch()
Unit test on middleware