public static void assertEqualWhenValueParsed(
      Parser<? extends MessageLite> parser,
      ProtoParametersSerialization one,
      ProtoParametersSerialization two) {
    assertThat(one.getKeyTemplate().getTypeUrl()).isEqualTo(two.getKeyTemplate().getTypeUrl());
    assertThat(one.getKeyTemplate().getOutputPrefixType())
        .isEqualTo(two.getKeyTemplate().getOutputPrefixType());
    try {
      MessageLite valueOne =
          parser.parseFrom(
              one.getKeyTemplate().getValue(), ExtensionRegistryLite.getEmptyRegistry());
      MessageLite valueTwo =
          parser.parseFrom(
              two.getKeyTemplate().getValue(), ExtensionRegistryLite.getEmptyRegistry());
      assertThat(valueOne).isEqualTo(valueTwo);
    } catch (InvalidProtocolBufferException e) {
      throw new AssertionError("Unable to parse value with given parser", e);
    }
  }
Throws an assertion error if two {@link ProtoParametersSerialization} objects are not equal.

<p>Because ProtoSerialization is not deterministic, this requires a parser for the proto
message embedded in the {@code ProtoParametersSerialization}.

<p>Equality of the protos is decided by message equality, see {@link
com.google.protobuf.Message#equals}.
java_src/src/main/java/com/google/crypto/tink/internal/testing/Asserts.java