adding unit test for Rest Api