Move test case into rest_api_test.rb