@Test
public void validateKey_invalidSha1Key_throws() throws Exception {

  HkdfPrfKey key =
      HkdfPrfKey.newBuilder()
          .setVersion(0)
          .setKeyValue(ByteString.copyFrom(Random.randBytes(32)))
          .setParams(HkdfPrfParams.newBuilder().setHash(HashType.SHA1))
          .build();
  try {
    manager.validateKey(key);
    fail();
  } catch (GeneralSecurityException e) {
    // expected
  }
}