wrote tests for the rest service