Improved tests for REST module