Solved bugs and added tests in sal-rest-connector