added tests for new rest api abstraction