Adding a test to check #8: 

Task-Url: http://github.com/meisam/spark/issues/issue/8