Refactor tests to check for rules
Refactor REST helper methods with rest_*