Added spec tests for middleware config
Enhancements