Added tests for generateHash