@Test
public void testToEcdsaAlgo() throws Exception {

  assertEquals("SHA256withECDSA", SubtleUtil.toEcdsaAlgo(HashType.SHA256));
  assertEquals("SHA512withECDSA", SubtleUtil.toEcdsaAlgo(HashType.SHA512));
  try {
    SubtleUtil.toEcdsaAlgo(HashType.SHA1);
    fail("Invalid hash, should have thrown exception");
  } catch (GeneralSecurityException expected) {
  }
}