added key generation tests