add unit tests for rest services