Added unit test for REST