add tests for generateWord()