@Test
public void testRsa3072PssSha256F4Template() throws Exception {

  KeyTemplate template = RsaSsaPssSignKeyManager.rsa3072PssSha256F4Template();
  assertThat(template.getTypeUrl()).isEqualTo(new RsaSsaPssSignKeyManager().getKeyType());
  assertThat(template.getOutputPrefixType()).isEqualTo(KeyTemplate.OutputPrefixType.TINK);
  RsaSsaPssKeyFormat format =
      RsaSsaPssKeyFormat.parseFrom(template.getValue(), ExtensionRegistryLite.getEmptyRegistry());
  assertThat(format.hasParams()).isTrue();
  assertThat(format.getParams().getSigHash()).isEqualTo(HashType.SHA256);
  assertThat(format.getParams().getMgf1Hash()).isEqualTo(HashType.SHA256);
  assertThat(format.getParams().getSaltLength()).isEqualTo(32);
  assertThat(format.getModulusSizeInBits()).isEqualTo(3072);
  assertThat(new BigInteger(1, format.getPublicExponent().toByteArray()))
      .isEqualTo(BigInteger.valueOf(65537));
}