@Test
public void validateKey_wrongVersion_throws() throws Exception {

  EcdsaPublicKey wrongVersionKey =
      EcdsaPublicKey.newBuilder(validPublicKey()).setVersion(1).build();
  try {
    verifyManager.validateKey(wrongVersionKey);
    fail();
  } catch (GeneralSecurityException e) {
    // expected.
  }
}