added test cases in the rest layer