@Test
  public void testParseToLegacyFormat() throws Exception {
    KeyTemplate template =
        KeyTemplate.newBuilder()
            .setValue(ByteString.copyFrom(Hex.decode("80")))
            .setOutputPrefixType(OutputPrefixType.TINK)
            .setTypeUrl("SomeInvalidTypeURL")
            .build();
    Parameters parsed = TinkProtoParametersFormat.parse(template.toByteArray());

    LegacyProtoParameters expected =
        new LegacyProtoParameters(ProtoParametersSerialization.create(template));

    assertThat(parsed).isEqualTo(expected);
  }
When parsing, if a TypeURL is not recognized we currently always parse into a Legacy object
java_src/src/test/java/com/google/crypto/tink/TinkProtoParametersFormatTest.java