|
|
|
@ -183,7 +183,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
Mockito.when(alarmService.createOrUpdateAlarm(Mockito.any())).thenAnswer(AdditionalAnswers.returnsFirstArg()); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())).thenReturn(theMsg); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())).thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
data.put("temperature", 42); |
|
|
|
@ -195,7 +195,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
verify(ctx, Mockito.never()).tellFailure(Mockito.any(), Mockito.any()); |
|
|
|
|
|
|
|
TbMsg theMsg2 = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), "2"); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())).thenReturn(theMsg2); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())).thenReturn(theMsg2); |
|
|
|
|
|
|
|
|
|
|
|
TbMsg msg2 = TbMsg.newMsg(SessionMsgType.POST_TELEMETRY_REQUEST.name(), deviceId, new TbMsgMetaData(), |
|
|
|
@ -274,7 +274,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(attrListListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -361,7 +361,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(attrListListenableFuture); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -430,7 +430,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(listListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -510,7 +510,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -584,7 +584,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -668,7 +668,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
@ -754,7 +754,7 @@ public class TbDeviceProfileNodeTest { |
|
|
|
.thenReturn(optionalListenableFutureWithLess); |
|
|
|
|
|
|
|
TbMsg theMsg = TbMsg.newMsg("ALARM", deviceId, new TbMsgMetaData(), ""); |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
Mockito.when(ctx.newMsg(Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.any(), Mockito.anyString())) |
|
|
|
.thenReturn(theMsg); |
|
|
|
|
|
|
|
ObjectNode data = mapper.createObjectNode(); |
|
|
|
|