ADD defaults middleware & test cases