Fix tests: InvalidPrivateKey renamed to InvalidKey