Add unit test for rest services