tests for rest