Created generate key unit test.