Refactored test coverage for restful router