|
|
|
@ -127,7 +127,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(cache.get(tenantId, deviceId)).thenReturn(deviceProfile); |
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 42); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type("123456789") |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -151,7 +151,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(cache.get(tenantId, deviceId)).thenReturn(deviceProfile); |
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 42); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -210,7 +210,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(alarmService.findLatestActiveByOriginatorAndType(tenantId, deviceId, "highTemperatureAlarm")).thenReturn(null); |
|
|
|
registerCreateAlarmMock(alarmService.createAlarm(any()), true); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -220,7 +220,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 42); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -234,7 +234,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
verify(ctx).enqueueForTellNext(theMsg, "Alarm Created"); |
|
|
|
verify(ctx, Mockito.never()).tellFailure(Mockito.any(), Mockito.any()); |
|
|
|
|
|
|
|
TbMsg theMsg2 = TbMsg.builder() |
|
|
|
TbMsg theMsg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -245,7 +245,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
registerCreateAlarmMock(alarmService.updateAlarm(any()), false); |
|
|
|
|
|
|
|
Thread.sleep(1); |
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -310,7 +310,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(alarmService.findLatestActiveByOriginatorAndType(tenantId, deviceId, "highTemperatureAlarm1")).thenReturn(null); |
|
|
|
registerCreateAlarmMock(alarmService.createAlarm(any()), true); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -320,7 +320,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 42); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -334,7 +334,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
verify(ctx).enqueueForTellNext(theMsg, "Alarm Created"); |
|
|
|
verify(ctx, Mockito.never()).tellFailure(Mockito.any(), Mockito.any()); |
|
|
|
|
|
|
|
TbMsg theMsg2 = TbMsg.builder() |
|
|
|
TbMsg theMsg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -358,7 +358,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
when(alarmService.updateAlarm(any())).thenReturn(result); |
|
|
|
|
|
|
|
data.put("temperature", 52); |
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -440,7 +440,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(attrListListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -451,7 +451,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 21); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -540,7 +540,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(tenantId), Mockito.any(AttributeScope.class), Mockito.anyString())) |
|
|
|
.thenReturn(attrListListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -551,7 +551,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 21); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -622,7 +622,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -633,7 +633,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -730,7 +730,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -741,7 +741,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -763,7 +763,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
Thread.sleep(halfOfAlarmDelay + 1); |
|
|
|
|
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -875,7 +875,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listNoDurationAttribute); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -886,7 +886,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 150); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -908,7 +908,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
Thread.sleep(halfOfAlarmDelay + 1); |
|
|
|
|
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1005,7 +1005,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1016,7 +1016,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 150); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1032,7 +1032,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
verify(ctx, Mockito.never()).tellNext(theMsg, "Alarm Created"); |
|
|
|
|
|
|
|
data.put("temperature", 151); |
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1142,7 +1142,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listNoDurationAttribute); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1153,7 +1153,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 150); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1169,7 +1169,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
verify(ctx, Mockito.never()).tellNext(theMsg, "Alarm Created"); |
|
|
|
|
|
|
|
data.put("temperature", 151); |
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1258,7 +1258,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1269,7 +1269,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1291,7 +1291,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
Thread.sleep(halfOfAlarmDelay + 1); |
|
|
|
|
|
|
|
TbMsg msg2 = TbMsg.builder() |
|
|
|
TbMsg msg2 = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1376,7 +1376,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1387,7 +1387,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1471,7 +1471,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFutureActiveSchedule); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1482,7 +1482,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1580,7 +1580,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(deviceId), Mockito.any(AttributeScope.class), Mockito.anySet())) |
|
|
|
.thenReturn(listListenableFutureInactiveSchedule); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1589,7 +1589,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 35); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1671,7 +1671,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(customerId), eq(AttributeScope.SERVER_SCOPE), Mockito.anyString())) |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1682,7 +1682,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 25); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1757,7 +1757,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(tenantId), eq(AttributeScope.SERVER_SCOPE), Mockito.anyString())) |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1768,7 +1768,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 40); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1853,7 +1853,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(tenantId), eq(AttributeScope.SERVER_SCOPE), Mockito.anyString())) |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1864,7 +1864,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 150L); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1951,7 +1951,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
Mockito.when(attributesService.find(eq(tenantId), eq(tenantId), eq(AttributeScope.SERVER_SCOPE), Mockito.anyString())) |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.builder() |
|
|
|
TbMsg theMsg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.ALARM) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
@ -1962,7 +1962,7 @@ public class TbDeviceProfileNodeTest extends AbstractRuleNodeUpgradeTest { |
|
|
|
|
|
|
|
ObjectNode data = JacksonUtil.newObjectNode(); |
|
|
|
data.put("temperature", 150L); |
|
|
|
TbMsg msg = TbMsg.builder() |
|
|
|
TbMsg msg = TbMsg.newMsg() |
|
|
|
.type(TbMsgType.POST_TELEMETRY_REQUEST) |
|
|
|
.originator(deviceId) |
|
|
|
.metaData(TbMsgMetaData.EMPTY.copy()) |
|
|
|
|