wrote unit tests for the rests service