public static <T extends Message> ProtoCoder<T> of(Class<T> protoMessageClass) {
    return new ProtoCoder<>(protoMessageClass, ImmutableSet.of());
  }
@Test
  public void testNonDeterministicProperty() throws CoderException {
    MessageWithMap.Builder msg1B = MessageWithMap.newBuilder();
    MessageWithMap.Builder msg2B = MessageWithMap.newBuilder();

    // Built in reverse order but with equal contents.
    for (int i = 0; i < 10; ++i) {
      msg1B.getMutableField1().put("key" + i, MessageA.getDefaultInstance());
      msg2B.getMutableField1().put("key" + (9 - i), MessageA.getDefaultInstance());
    }

    // Assert the messages are equal.
    MessageWithMap msg1 = msg1B.build();
    MessageWithMap msg2 = msg2B.build();
    assertEquals(msg2, msg1);

    // Assert the encoded messages are not equal.
    Coder<MessageWithMap> coder = ProtoCoder.of(MessageWithMap.class);
    assertNotEquals(CoderUtils.encodeToBase64(coder, msg2), CoderUtils.encodeToBase64(coder, msg1));
  }