Test cases for REST layer and Javadoc added