test code for rest