aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java b/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
index a3bc3af2b..babd7285d 100644
--- a/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
+++ b/src/test/java/org/traccar/protocol/GatorProtocolEncoderTest.java
@@ -1,5 +1,7 @@
package org.traccar.protocol;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
import org.junit.jupiter.api.Test;
import org.traccar.ProtocolTest;
import org.traccar.model.Command;
@@ -11,7 +13,12 @@ public class GatorProtocolEncoderTest extends ProtocolTest {
@Test
void testEncodeId() throws Exception {
var encoder = inject(new GatorProtocolEncoder(null));
- assertEquals("2008958C", encoder.encodeId(13332082112L));
+ ByteBuf pseudoId = Unpooled.buffer();
+ pseudoId.writeByte(0x20);
+ pseudoId.writeByte(0x08);
+ pseudoId.writeByte(0x95);
+ pseudoId.writeByte(0x8C);
+ assertEquals(pseudoId, encoder.encodeId(13332082112L));
}
@Test