Added unit test

- Unit test
- Some minor improvements
- rank handler now takes url as a get rather than post 

This will also need some changed in readme. I will do it after we have the other readme PR merged.
https://github.com/cdap-guides/cdap-spark-guide/pull/16
Yes I have to. As mentioned in the description of the PR I will first merge thr open readme pr and then do changes to it. Since, it's minor name changes so should be a very small task.
I will do it before merging this pr.