use of org.apache.beam.sdk.extensions.protobuf.Proto2CoderTestMessages.MessageC in project beam by apache.
the class ProtoCoderTest method testCoderEncodeDecodeExtensionsEqual.
@Test
public void testCoderEncodeDecodeExtensionsEqual() throws Exception {
MessageC value = MessageC.newBuilder().setExtension(Proto2CoderTestMessages.field1, MessageA.newBuilder().setField1("hello").addField2(MessageB.newBuilder().setField1(true).build()).build()).setExtension(Proto2CoderTestMessages.field2, MessageB.newBuilder().setField1(false).build()).build();
CoderProperties.coderDecodeEncodeEqual(ProtoCoder.of(MessageC.class).withExtensionsFrom(Proto2CoderTestMessages.class), value);
}