public static DynamicProtoCoder of(Descriptors.Descriptor protoMessageDescriptor) {
    return new DynamicProtoCoder(
        ProtoDomain.buildFrom(protoMessageDescriptor),
        protoMessageDescriptor.getFullName(),
        ImmutableSet.of());
  }
@Test
  public void testDynamicMessage() throws Exception {
    DynamicMessage message =
        DynamicMessage.newBuilder(MessageA.getDescriptor())
            .setField(
                MessageA.getDescriptor().findFieldByNumber(MessageA.FIELD1_FIELD_NUMBER), "foo")
            .build();
    Coder<DynamicMessage> coder = DynamicProtoCoder.of(message.getDescriptorForType());

    // Special code to check the DynamicMessage equality (@see IsDynamicMessageEqual)
    for (Coder.Context context : ALL_CONTEXTS) {
      CoderProperties.coderDecodeEncodeInContext(
          coder, context, message, IsDynamicMessageEqual.equalTo(message));
    }
  }