Added tests to some vulnerable section of the code