[ELY-94] Replace tests against exact KeySpec types for isAssignableFrom ...

...checks
This looks like the right idea to me - hopefully it'll be this simple for all of them.