Added key generation tests