@Test
public void testRawRsa4096SsaPkcs1Sha512F4Template() throws Exception {

  KeyTemplate template = RsaSsaPkcs1SignKeyManager.rawRsa4096SsaPkcs1Sha512F4Template();
  assertThat(template.getTypeUrl()).isEqualTo(new RsaSsaPkcs1SignKeyManager().getKeyType());
  assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.RAW);
  RsaSsaPkcs1KeyFormat format =
      RsaSsaPkcs1KeyFormat.parseFrom(
          template.getValue(), ExtensionRegistryLite.getEmptyRegistry());
  assertThat(format.hasParams()).isTrue();
  assertThat(format.getParams().getHashType()).isEqualTo(HashType.SHA512);
  assertThat(format.getModulusSizeInBits()).isEqualTo(4096);
  assertThat(new BigInteger(1, format.getPublicExponent().toByteArray()))
      .isEqualTo(BigInteger.valueOf(65537));
}