Showing
1 changed file
with
9 additions
and
2 deletions
@@ -1195,7 +1195,7 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { | @@ -1195,7 +1195,7 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { | ||
1195 | Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdMSB(), edgeRootRuleChainId.getId().getMostSignificantBits()); | 1195 | Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdMSB(), edgeRootRuleChainId.getId().getMostSignificantBits()); |
1196 | Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdLSB(), edgeRootRuleChainId.getId().getLeastSignificantBits()); | 1196 | Assert.assertEquals(ruleChainMetadataUpdateMsg.getRuleChainIdLSB(), edgeRootRuleChainId.getId().getLeastSignificantBits()); |
1197 | 1197 | ||
1198 | - testAutoGeneratedCodeByProtobuf(ruleChainMetadataRequestMsg); | 1198 | + testAutoGeneratedCodeByProtobuf(ruleChainMetadataUpdateMsg); |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | private void sendUserCredentialsRequest() throws Exception { | 1201 | private void sendUserCredentialsRequest() throws Exception { |
@@ -1390,9 +1390,16 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { | @@ -1390,9 +1390,16 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { | ||
1390 | 1390 | ||
1391 | private void testAutoGeneratedCodeByProtobuf(MessageLite.Builder builder) throws InvalidProtocolBufferException { | 1391 | private void testAutoGeneratedCodeByProtobuf(MessageLite.Builder builder) throws InvalidProtocolBufferException { |
1392 | MessageLite source = builder.build(); | 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 | MessageLite target = source.getParserForType().parseFrom(source.toByteArray()); | 1401 | MessageLite target = source.getParserForType().parseFrom(source.toByteArray()); |
1394 | Assert.assertEquals(source, target); | 1402 | Assert.assertEquals(source, target); |
1395 | Assert.assertEquals(source.hashCode(), target.hashCode()); | 1403 | Assert.assertEquals(source.hashCode(), target.hashCode()); |
1396 | - builder.clear().mergeFrom(target); | ||
1397 | } | 1404 | } |
1398 | } | 1405 | } |