aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-01-24 20:18:57 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-01-24 20:18:57 -0800
commit5a854ce946cc49dbb176b5a436a1b1d6673ba096 (patch)
tree610883b134698c1b23f45439f453716cd3e0fbab /src/test
parenta8af4b7d0b7eec1e3076bd51bc2e81c6df0626ac (diff)
downloadtrackermap-server-5a854ce946cc49dbb176b5a436a1b1d6673ba096.tar.gz
trackermap-server-5a854ce946cc49dbb176b5a436a1b1d6673ba096.tar.bz2
trackermap-server-5a854ce946cc49dbb176b5a436a1b1d6673ba096.zip
Handle empty response
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
index 604ccef6e..af35505d5 100644
--- a/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class OrbcommProtocolDecoderTest extends ProtocolTest {
var decoder = new OrbcommProtocolDecoder(null);
+ verifyNull(decoder, response(
+ buffer("{\"ErrorID\":0,\"NextStartUTC\":\"\",\"Messages\":null}")));
+
verifyPositions(decoder, response(
buffer("{\"ErrorID\":0,\"NextStartUTC\":\"2022-01-20 21:17:19\",\"Messages\":[{\"ID\":21545955455454,\"MessageUTC\":\"2022-01-20 21:17:19\",\"ReceiveUTC\":\"2022-01-20 21:17:19\",\"SIN\":19,\"MobileID\":\"01097623SKY2C68\",\"Payload\":{\"Name\":\"simpleReport\",\"SIN\":19,\"MIN\":1,\"Fields\":[{\"Name\":\"latitude\",\"Value\":\"2717900\",\"Type\":\"signedint\"},{\"Name\":\"longitude\",\"Value\":\"-4555211\",\"Type\":\"signedint\"},{\"Name\":\"speed\",\"Value\":\"0\",\"Type\":\"unsignedint\"},{\"Name\":\"heading\",\"Value\":\"1439\",\"Type\":\"unsignedint\"}]},\"RegionName\":\"\",\"OTAMessageSize\":17,\"CustomerID\":0,\"Transport\":1,\"MobileOwnerID\":60000934}]}")));