assertThat(edgeImitator.waitForMessages()).as("await for messages on first connect").isTrue();
Assert.assertEquals(2,edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class).size());// one msg during sync process, another from edge creation
Assert.assertEquals(1,edgeImitator.findAllMessagesByType(DeviceProfileUpdateMsg.class).size());// one msg during sync process for 'default' device profile
Assert.assertEquals(1,edgeImitator.findAllMessagesByType(DeviceUpdateMsg.class).size());// one msg once device assigned to edge
Assert.assertEquals(2,edgeImitator.findAllMessagesByType(AssetUpdateMsg.class).size());// two msgs - one during sync process, and one more once asset assigned to edge
Assert.assertEquals(1,edgeImitator.findAllMessagesByType(UserUpdateMsg.class).size());// one msg during sync process for tenant admin user
assertThat(edgeImitator.findAllMessagesByType(RuleChainUpdateMsg.class)).as("one msg during sync process, another from edge creation").hasSize(2);
assertThat(edgeImitator.findAllMessagesByType(DeviceProfileUpdateMsg.class)).as("one msg during sync process for 'default' device profile").hasSize(1);
assertThat(edgeImitator.findAllMessagesByType(DeviceUpdateMsg.class)).as("one msg once device assigned to edge").hasSize(1);
assertThat(edgeImitator.findAllMessagesByType(AssetUpdateMsg.class)).as("two msgs - one during sync process, and one more once asset assigned to edge").hasSize(2);
assertThat(edgeImitator.findAllMessagesByType(UserUpdateMsg.class)).as("one msg during sync process for tenant admin user").hasSize(1);