Added unit tests for generated keys