Commit 23d4c5ee99b805cac125818970b59e1d8bd5ab73

Authored by Volodymyr Babak
1 parent c0a5ae5e

Merge fix

... ... @@ -1195,7 +1195,7 @@ abstract public class BaseEdgeTest extends AbstractControllerTest {
1195 1195 Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdMSB(), edgeRootRuleChainId.getId().getMostSignificantBits());
1196 1196 Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdLSB(), edgeRootRuleChainId.getId().getLeastSignificantBits());
1197 1197
1198   - testAutoGeneratedCodeByProtobuf(ruleChainMetadataRequestMsg);
  1198 + testAutoGeneratedCodeByProtobuf(ruleChainMetadataUpdateMsg);
1199 1199 }
1200 1200
1201 1201 private void sendUserCredentialsRequest() throws Exception {
... ... @@ -1390,9 +1390,16 @@ abstract public class BaseEdgeTest extends AbstractControllerTest {
1390 1390
1391 1391 private void testAutoGeneratedCodeByProtobuf(MessageLite.Builder builder) throws InvalidProtocolBufferException {
1392 1392 MessageLite source = builder.build();
  1393 +
  1394 + testAutoGeneratedCodeByProtobuf(source);
  1395 +
  1396 + MessageLite target = source.getParserForType().parseFrom(source.toByteArray());
  1397 + builder.clear().mergeFrom(target);
  1398 + }
  1399 +
  1400 + private void testAutoGeneratedCodeByProtobuf(MessageLite source) throws InvalidProtocolBufferException {
1393 1401 MessageLite target = source.getParserForType().parseFrom(source.toByteArray());
1394 1402 Assert.assertEquals(source, target);
1395 1403 Assert.assertEquals(source.hashCode(), target.hashCode());
1396   - builder.clear().mergeFrom(target);
1397 1404 }
1398 1405 }
... ...