reflectionTester.assertClearViaReflection(
DynamicMessage.newBuilder(TestAllTypes.getDescriptor()).build());
}
public void testDynamicMessageSerializedSize() throws Exception {
TestAllTypes message = TestUtil.getAllSet();
Message.Builder dynamicBuilder =
DynamicMessage.newBuilder(TestAllTypes.getDescriptor());
reflectionTester.setAllFieldsViaReflection(dynamicBuilder);
Message dynamicMessage = dynamicBuilder.build();
assertEquals(message.getSerializedSize(),
dynamicMessage.getSerializedSize());
}