aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 10:48:34 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 10:48:34 +1200
commitd1c4cd526845aad56c5b0a3e20454638bbc7fecc (patch)
tree565ee245ea0e98b88674b775147fbc6d3e1933cb /test
parent88b3f00f3855aa408c7859051efdcb5b37fe559f (diff)
downloadtrackermap-server-d1c4cd526845aad56c5b0a3e20454638bbc7fecc.tar.gz
trackermap-server-d1c4cd526845aad56c5b0a3e20454638bbc7fecc.tar.bz2
trackermap-server-d1c4cd526845aad56c5b0a3e20454638bbc7fecc.zip
Merge commands implmentation (fix #1271)
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/http/json/JsonConverterTestCase.java171
-rw-r--r--test/org/traccar/protocol/ApelProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/AplicomProtocolDecoderTest.java4
-rw-r--r--test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/AtrackProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/AutoFonProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Avl301ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/BceProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/BoxProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/CalAmpProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/CarTrackProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/CarscopProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/CastelProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/CellocatorProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/EelinkProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/EnforaProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Ev603ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/FreedomProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/GalileoProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Gl100ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Gl200ProtocolDecoderTest.java4
-rw-r--r--test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/GoSafeProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/GotopProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/GpsGateProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Gt02ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/H02ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/HaicomProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/IntellitracProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Jt600ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/KhdProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/LaipacProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/M2mProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/ManPowerProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MegastekProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MeitrackProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MtxProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/MxtProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/NavigilProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/NavisProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/NoranProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/OrionProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/OsmAndProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/PiligrimProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/ProgressProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Pt502ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/RitiProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/RuptelaProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/SanavProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Stl060ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/SuntechProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/SyrusProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/T55ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TelikProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Tk102ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Tk103ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TopflytechProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TotemProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Tr20ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Tr900ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TrackboxProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TramigoProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/TytanProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/UlbotechProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/V680ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/VisiontekProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/WialonProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/WondexProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/XexunProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/XirgoProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Xt013ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/Xt7ProtocolDecoderTest.java2
-rw-r--r--test/org/traccar/protocol/YwtProtocolDecoderTest.java2
85 files changed, 257 insertions, 86 deletions
diff --git a/test/org/traccar/http/json/JsonConverterTestCase.java b/test/org/traccar/http/json/JsonConverterTestCase.java
new file mode 100644
index 000000000..d81ca3bc9
--- /dev/null
+++ b/test/org/traccar/http/json/JsonConverterTestCase.java
@@ -0,0 +1,171 @@
+package org.traccar.http.json;
+
+import org.junit.Test;
+import org.traccar.http.JsonConverter;
+import org.traccar.model.Factory;
+
+import java.io.Reader;
+import java.io.StringReader;
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.Date;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class JsonConverterTestCase {
+
+ private <T extends Factory> T convert(String jsonString, T prototype) throws ParseException {
+ Reader r = new StringReader(
+ jsonString);
+
+ return JsonConverter.objectFromJson(r, prototype);
+ }
+
+ @Test
+ public void primitiveConversion() throws ParseException {
+
+ AllPrimitives o = convert("{" +
+ "\"aBoolean\": true, " +
+ "\"anInt\": 42, " +
+ "\"aDouble\": 41.99, " +
+ "\"aString\": \"discworld\", " +
+ "\"aDate\":\"2015-07-09T19:02:17\"" +
+ "}",
+ new AllPrimitives());
+
+ assertEquals(true, o.getaBoolean());
+ assertEquals(42, o.getAnInt());
+ assertEquals(41.99, o.getaDouble(), 0.001);
+ assertEquals("discworld", o.getaString());
+
+ Calendar c = Calendar.getInstance();
+ c.setTime(o.getaDate());
+ assertEquals(2015, c.get(Calendar.YEAR));
+ assertEquals(Calendar.JULY, c.get(Calendar.MONTH));
+ assertEquals(9, c.get(Calendar.DAY_OF_MONTH));
+ assertEquals(19, c.get(Calendar.HOUR_OF_DAY));
+ assertEquals(2, c.get(Calendar.MINUTE));
+ assertEquals(17, c.get(Calendar.SECOND));
+ }
+
+ public static class AllPrimitives implements Factory {
+
+ private boolean aBoolean;
+ private int anInt;
+ private double aDouble;
+ private String aString;
+ private Date aDate;
+
+
+ @Override
+ public Object create() {
+ return new AllPrimitives();
+ }
+
+ public boolean getaBoolean() {
+ return aBoolean;
+ }
+
+ public void setaBoolean(boolean aBoolean) {
+ this.aBoolean = aBoolean;
+ }
+
+ public int getAnInt() {
+ return anInt;
+ }
+
+ public void setAnInt(int anInt) {
+ this.anInt = anInt;
+ }
+
+ public double getaDouble() {
+ return aDouble;
+ }
+
+ public void setaDouble(double aDouble) {
+ this.aDouble = aDouble;
+ }
+
+ public String getaString() {
+ return aString;
+ }
+
+ public void setaString(String aString) {
+ this.aString = aString;
+ }
+
+ public Date getaDate() {
+ return aDate;
+ }
+
+ public void setaDate(Date aDate) {
+ this.aDate = aDate;
+ }
+ }
+
+
+ @Test
+ public void enumConversion() throws ParseException {
+ ObjectWithEnum o = convert("{\"anEnum\": \"VALUE2\"}", new ObjectWithEnum());
+ assertEquals(TestEnum.VALUE2, o.getAnEnum());
+ }
+
+
+ public enum TestEnum {
+ VALUE1, VALUE2
+ }
+
+ public static class ObjectWithEnum implements Factory {
+ private TestEnum anEnum;
+
+ public TestEnum getAnEnum() {
+ return anEnum;
+ }
+
+ public void setAnEnum(TestEnum anEnum) {
+ this.anEnum = anEnum;
+ }
+
+ @Override
+ public Object create() {
+ return new ObjectWithEnum();
+ }
+ }
+
+
+ @Test
+ public void nestedObjectsConversion() throws ParseException {
+ NestedObjects o = convert("{\"name\": \"Rincewind\", \"nestedObject\": {\"anEnum\":\"VALUE1\"}}", new NestedObjects());
+ assertEquals("Rincewind", o.getName());
+ assertNotNull("The nested object should be populated", o.getNestedObject());
+ assertEquals(TestEnum.VALUE1, o.getNestedObject().getAnEnum());
+ }
+
+ public static class NestedObjects implements Factory {
+
+ private String name;
+ private ObjectWithEnum nestedObject;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ObjectWithEnum getNestedObject() {
+ return nestedObject;
+ }
+
+ public void setNestedObject(ObjectWithEnum nestedObject) {
+ this.nestedObject = nestedObject;
+ }
+
+ @Override
+ public Object create() {
+ return new NestedObjects();
+ }
+ }
+}
diff --git a/test/org/traccar/protocol/ApelProtocolDecoderTest.java b/test/org/traccar/protocol/ApelProtocolDecoderTest.java
index f6899a6ad..1eb02b3b8 100644
--- a/test/org/traccar/protocol/ApelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ApelProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class ApelProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- ApelProtocolDecoder decoder = new ApelProtocolDecoder(null);
+ ApelProtocolDecoder decoder = new ApelProtocolDecoder(new ApelProtocol());
/*byte[] buf1 = {0x40,0x4E,0x54,0x43,0x01,0x00,0x00,0x00,0x7B,0x00,0x00,0x00,0x13,0x00,0x44,0x34,0x2A,0x3E,0x53,0x3A,0x38,0x36,0x31,0x37,0x38,0x35,0x30,0x30,0x35,0x32,0x30,0x35,0x30,0x37,0x39};
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));*/
diff --git a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
index e163b8e35..6f1c204eb 100644
--- a/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AplicomProtocolDecoderTest.java
@@ -10,8 +10,8 @@ public class AplicomProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(null);
-
+ AplicomProtocolDecoder decoder = new AplicomProtocolDecoder(new AplicomProtocol());
+
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"44C20146B710C158DA002100B09F0700C054CA0EA254CA0E9C03BE0BF6015D7069070000142A600000000000000001"))));
diff --git a/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java b/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
index 90993475e..d27e455ab 100644
--- a/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
@@ -11,7 +11,7 @@ public class Ardi01ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Ardi01ProtocolDecoder decoder = new Ardi01ProtocolDecoder(null);
+ Ardi01ProtocolDecoder decoder = new Ardi01ProtocolDecoder(new Ardi01Protocol());
verify(decoder.decode(null, null,
"013227003054776,20141010052719,24.4736042,56.8445807,110,289,40,7,5,78,-1"));
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 34f34c957..4433afb91 100644
--- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class AtrackProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(null);
+ AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new AtrackProtocol());
assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"fe0200014104d8f196820001"))));
diff --git a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
index 26c25833b..e76a75e97 100644
--- a/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AutoFon45ProtocolDecoderTest.java
@@ -11,7 +11,7 @@ import static org.traccar.helper.DecoderVerifier.verify;
public class AutoFon45ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- AutoFon45ProtocolDecoder decoder = new AutoFon45ProtocolDecoder(null);
+ AutoFon45ProtocolDecoder decoder = new AutoFon45ProtocolDecoder(new AutoFon45Protocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"41032125656985547543619173484002123481"))));
diff --git a/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
index ded0aca6f..8fa323531 100644
--- a/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AutoFonProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class AutoFonProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- AutoFonProtocolDecoder decoder = new AutoFonProtocolDecoder(null);
+ AutoFonProtocolDecoder decoder = new AutoFonProtocolDecoder(new AutoFonProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"10556103592310314825728F"))));
diff --git a/test/org/traccar/protocol/Avl301ProtocolDecoderTest.java b/test/org/traccar/protocol/Avl301ProtocolDecoderTest.java
index 666bb0b43..b431fa868 100644
--- a/test/org/traccar/protocol/Avl301ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Avl301ProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class Avl301ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Avl301ProtocolDecoder decoder = new Avl301ProtocolDecoder(null);
+ Avl301ProtocolDecoder decoder = new Avl301ProtocolDecoder(new Avl301Protocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"244c0f086058500087335500010d0a"))));
diff --git a/test/org/traccar/protocol/BceProtocolDecoderTest.java b/test/org/traccar/protocol/BceProtocolDecoderTest.java
index 356a6fba1..69567556d 100644
--- a/test/org/traccar/protocol/BceProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/BceProtocolDecoderTest.java
@@ -14,7 +14,7 @@ public class BceProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- BceProtocolDecoder decoder = new BceProtocolDecoder(null);
+ BceProtocolDecoder decoder = new BceProtocolDecoder(new BceProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"be76619c834601004200a0003fd769c568ffc3db0079161d420683a9414918b1150000000000d102660167040000000000009f06357f0000a401042ea415e10232000000000000000000000051"))));
diff --git a/test/org/traccar/protocol/BoxProtocolDecoderTest.java b/test/org/traccar/protocol/BoxProtocolDecoderTest.java
index a864d62dd..7cbb1aa4c 100644
--- a/test/org/traccar/protocol/BoxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/BoxProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class BoxProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- BoxProtocolDecoder decoder = new BoxProtocolDecoder(null);
+ BoxProtocolDecoder decoder = new BoxProtocolDecoder(new BoxProtocol());
assertNull(decoder.decode(null, null,
"H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2"));
diff --git a/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java b/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
index 5f2e5bfce..ab96dab07 100644
--- a/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class CalAmpProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- CalAmpProtocolDecoder decoder = new CalAmpProtocolDecoder(null);
+ CalAmpProtocolDecoder decoder = new CalAmpProtocolDecoder(new CalAmpProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"830545321041830101010300010000333862000023c301000000004532104183ffffff353816051610691f420040163953294fffffffffffffffff8996604211639032949f4f54413a317c303b302c317c343b302c34004f5441535441543a302c302c302c302c302c222200564255533a342c322e302e302c343533323130343138332c5630312e30332e30312e34302c5630312e30332e30312e33312c2c0056494e2d494e464f3a56494e3d31464d5a5537324539355a4137303032362c4445562d5245474e3d55532c535256522d5245474e3d555300")), null));
diff --git a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
index 05e2402a6..f70fe43f5 100644
--- a/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CarTrackProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class CarTrackProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- CarTrackProtocolDecoder decoder = new CarTrackProtocolDecoder(null);
+ CarTrackProtocolDecoder decoder = new CarTrackProtocolDecoder(new CarTrackProtocol());
verify(decoder.decode(null, null,
"$$2222234???????&A9955&B102904.000,A,2233.0655,N,11404.9440,E,0.00,,030109,,*17|6.3|&C0100000100&D000024?>&E10000000&Y00100020"));
diff --git a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
index 04217dcd6..08f40c085 100644
--- a/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CarscopProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class CarscopProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- CarscopProtocolDecoder decoder = new CarscopProtocolDecoder(null);
+ CarscopProtocolDecoder decoder = new CarscopProtocolDecoder(new CarscopProtocol());
verify(decoder.decode(null, null,
"*040331141830UB05123456789012345061825A2934.0133N10627.2544E000.0040331309.6200000000L000000"));
diff --git a/test/org/traccar/protocol/CastelProtocolDecoderTest.java b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
index 1671e4d12..e814beb74 100644
--- a/test/org/traccar/protocol/CastelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class CastelProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- CastelProtocolDecoder decoder = new CastelProtocolDecoder(null);
+ CastelProtocolDecoder decoder = new CastelProtocolDecoder(new CastelProtocol());
assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40401F00043130303131313235323939383700000000000000100303320D0A"))));
diff --git a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index 74b7e305e..b980a9820 100644
--- a/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class CellocatorProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(null);
+ CellocatorProtocolDecoder decoder = new CellocatorProtocolDecoder(new CellocatorProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"4D4347500006000000081A02021204000000210062300000006B00E100000000000000000000E5A100040206614EA303181A57034E1200000000000000001525071403D60749"))));
diff --git a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
index 4edd2d052..71f5c2c46 100644
--- a/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class EasyTrackProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- EasyTrackProtocolDecoder decoder = new EasyTrackProtocolDecoder(null);
+ EasyTrackProtocolDecoder decoder = new EasyTrackProtocolDecoder(new EasyTrackProtocol());
assertNull(decoder.decode(null, null, "*ET,135790246811221,GZ,0001,0005"));
diff --git a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
index 6bf7d7143..e731fbbdd 100644
--- a/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EelinkProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class EelinkProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(null);
+ EelinkProtocolDecoder decoder = new EelinkProtocolDecoder(new EelinkProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"676701000b001b035418804661834901"))));
diff --git a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
index 7e67a300f..26499a365 100644
--- a/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/EnforaProtocolDecoderTest.java
@@ -14,7 +14,7 @@ public class EnforaProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- EnforaProtocolDecoder decoder = new EnforaProtocolDecoder(null);
+ EnforaProtocolDecoder decoder = new EnforaProtocolDecoder(new EnforaProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"000A08002020202020303131303730303030353730323637"))));
diff --git a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
index b56a92c16..32cf7ebb8 100644
--- a/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Ev603ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Ev603ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Ev603ProtocolDecoder decoder = new Ev603ProtocolDecoder(null);
+ Ev603ProtocolDecoder decoder = new Ev603ProtocolDecoder(new Ev603Protocol());
assertNull(decoder.decode(null, null, "!1,123456789012345"));
diff --git a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
index b39b7a0cd..2a86a0fec 100644
--- a/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/FreedomProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class FreedomProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- FreedomProtocolDecoder decoder = new FreedomProtocolDecoder(null);
+ FreedomProtocolDecoder decoder = new FreedomProtocolDecoder(new FreedomProtocol());
verify(decoder.decode(null, null,
"IMEI,353358011714362,2014/05/22, 20:49:32, N, Lat:4725.9624, E, Lon:01912.5483, Spd:5.05"));
diff --git a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
index b79de9fbf..9a312ac7a 100644
--- a/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GalileoProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class GalileoProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GalileoProtocolDecoder decoder = new GalileoProtocolDecoder(null);
+ GalileoProtocolDecoder decoder = new GalileoProtocolDecoder(new GalileoProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"011380033836383230343030313534393038370432008590"))));
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
index 6bcd829e3..38f9b4a1f 100644
--- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -11,7 +11,7 @@ public class GatorProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GatorProtocolDecoder decoder = new GatorProtocolDecoder(null);
+ GatorProtocolDecoder decoder = new GatorProtocolDecoder(new GatorProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"24248000260009632d141121072702059226180104367500000000c04700079c0c34000ad80b00ff000a0d"))));
diff --git a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
index 08003e155..8d2e3dd53 100644
--- a/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl100ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Gl100ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(null);
+ Gl100ProtocolDecoder decoder = new Gl100ProtocolDecoder(new Gl100Protocol());
assertNull(decoder.decode(null, null,
"AT+GTHBD=HeartBeat,359231030000010,20090101000000,11F0,0102120204"));
diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
index 96be1c5a2..638e9e9dc 100644
--- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
@@ -9,14 +9,14 @@ public class Gl200ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(null);
+ Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol());
verify(decoder.decode(null, null, null,
"+RESP:GTSTT,1A0401,860599000508846,,41,0,0.0,84,107.5,-76.657998,39.497203,20150623160622,0310,0260,B435,3B81,,20150623160622,0F54$"));
verify(decoder.decode(null, null, null,
"+RESP:GTFRI,1A0401,860599000508846,,0,0,1,1,134.8,154,278.7,-76.671089,39.778885,20150623154301,0310,0260,043F,7761,,99,20150623154314,0F24$"));
-
+
verify(decoder.decode(null, null, null,
"+RESP:GTFRI,1A0200,860599000165464,CRI001,0,0,1,2,,41,,-71.153137,42.301634,20150328020301,,,,,280.3,55,20150327220351,320C"));
diff --git a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
index c1885bb90..08e4cd77d 100644
--- a/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class GlobalSatProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GlobalSatProtocolDecoder decoder = new GlobalSatProtocolDecoder(null);
+ GlobalSatProtocolDecoder decoder = new GlobalSatProtocolDecoder(new GlobalSatProtocol());
assertNull(decoder.decode(null, null, "GSh,131826789036289,3,M,ea04*3d"));
diff --git a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
index 75d5b0121..938630655 100644
--- a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class GoSafeProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GoSafeProtocolDecoder decoder = new GoSafeProtocolDecoder(null);
+ GoSafeProtocolDecoder decoder = new GoSafeProtocolDecoder(new GoSafeProtocol());
assertNull(decoder.decode(null, null, null,
"*GS16,351535058709775"));
diff --git a/test/org/traccar/protocol/GotopProtocolDecoderTest.java b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
index bfeaf9e2e..9c544470b 100644
--- a/test/org/traccar/protocol/GotopProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GotopProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class GotopProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GotopProtocolDecoder decoder = new GotopProtocolDecoder(null);
+ GotopProtocolDecoder decoder = new GotopProtocolDecoder(new GotopProtocol());
assertNull(decoder.decode(null, null, ""));
diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 3e63d4b34..9a10d9932 100644
--- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Gps103ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(null);
+ Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new Gps103Protocol());
// Log on request
assertNull(decoder.decode(null, null, null, "##,imei:359586015829802,A"));
diff --git a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
index d50f03d39..876beb59c 100644
--- a/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GpsGateProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class GpsGateProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(null);
+ GpsGateProtocolDecoder decoder = new GpsGateProtocolDecoder(new GpsGateProtocol());
assertNull(decoder.decode(null, null, "$FRLIN,,user1,8IVHF*7A"));
diff --git a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
index 539fe2612..148a668b4 100644
--- a/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt02ProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class Gt02ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(null);
+ Gt02ProtocolDecoder decoder = new Gt02ProtocolDecoder(new Gt02Protocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"68682500000123456789012345000110010101010101026B3F3E026B3F3E000000000000000000010D0A"))));
diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index aee675b2e..3fcab6900 100644
--- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class Gt06ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(null);
+ Gt06ProtocolDecoder decoder = new Gt06ProtocolDecoder(new Gt06Protocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"787811010123456789012345100B3201000171930D0A"))));
diff --git a/test/org/traccar/protocol/H02ProtocolDecoderTest.java b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
index 443462a57..3f89e2213 100644
--- a/test/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class H02ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- H02ProtocolDecoder decoder = new H02ProtocolDecoder(null);
+ H02ProtocolDecoder decoder = new H02ProtocolDecoder(new H02Protocol());
verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
"*HQ,1451316409,V1,030149,A,-23-29.0095,S,-46-51.5852,W,2.4,065,070315,FFFFFFFF#", Charset.defaultCharset())));
diff --git a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
index 4ccd0fbd4..49a060472 100644
--- a/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/HaicomProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class HaicomProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(null);
+ HaicomProtocolDecoder decoder = new HaicomProtocolDecoder(new HaicomProtocol());
verify(decoder.decode(null, null,
"$GPRS012497007097169,T100001,150618,230031,5402267400332464,0004,2014,000001,,,1,00#V040*"));
diff --git a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
index 28e5a3ae7..8028e0f35 100644
--- a/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/IntellitracProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class IntellitracProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- IntellitracProtocolDecoder decoder = new IntellitracProtocolDecoder(null);
+ IntellitracProtocolDecoder decoder = new IntellitracProtocolDecoder(new IntellitracProtocol());
assertNull(decoder.decode(null, null, "$OK:TRACKING"));
diff --git a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
index 8f5f4db55..11b4ef1e4 100644
--- a/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Jt600ProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class Jt600ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(null);
+ Jt600ProtocolDecoder decoder = new Jt600ProtocolDecoder(new Jt600Protocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"24311021600111001B16021105591022329862114046227B0598095080012327951435161F"))));
diff --git a/test/org/traccar/protocol/KhdProtocolDecoderTest.java b/test/org/traccar/protocol/KhdProtocolDecoderTest.java
index 5d9e4ef2c..7926cf9c6 100644
--- a/test/org/traccar/protocol/KhdProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/KhdProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class KhdProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- KhdProtocolDecoder decoder = new KhdProtocolDecoder(null);
+ KhdProtocolDecoder decoder = new KhdProtocolDecoder(new KhdProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"2929b1000605162935b80d"))));
diff --git a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
index e74c2d411..42d474023 100644
--- a/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/LaipacProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class LaipacProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- LaipacProtocolDecoder decoder = new LaipacProtocolDecoder(null);
+ LaipacProtocolDecoder decoder = new LaipacProtocolDecoder(new LaipacProtocol());
assertNull(decoder.decode(null, null, "$AVSYS,99999999,V1.50,SN0000103,32768*15"));
diff --git a/test/org/traccar/protocol/M2mProtocolDecoderTest.java b/test/org/traccar/protocol/M2mProtocolDecoderTest.java
index ceb248fb5..8c0ff3b8c 100644
--- a/test/org/traccar/protocol/M2mProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/M2mProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class M2mProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- M2mProtocolDecoder decoder = new M2mProtocolDecoder(null);
+ M2mProtocolDecoder decoder = new M2mProtocolDecoder(new M2mProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"235A3C2A2624215C287D70212A21254C7C6421220B0B0B"))));
diff --git a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
index d5a722019..0d7a9ee5b 100644
--- a/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ManPowerProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class ManPowerProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- ManPowerProtocolDecoder decoder = new ManPowerProtocolDecoder(null);
+ ManPowerProtocolDecoder decoder = new ManPowerProtocolDecoder(new ManPowerProtocol());
verify(decoder.decode(null, null,
"simei:352581250259539,,,tracker,51,24,1.73,130426023608,A,3201.5462,N,03452.2975,E,0.01,28B9,1DED,425,01,1x0x0*0x1*60x+2,en-us,"));
diff --git a/test/org/traccar/protocol/MegastekProtocolDecoderTest.java b/test/org/traccar/protocol/MegastekProtocolDecoderTest.java
index dd044990f..cb112914b 100644
--- a/test/org/traccar/protocol/MegastekProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MegastekProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MegastekProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MegastekProtocolDecoder decoder = new MegastekProtocolDecoder(null);
+ MegastekProtocolDecoder decoder = new MegastekProtocolDecoder(new MegastekProtocol());
verify(decoder.decode(null, null,
"STX,GerAL22,$GPRMC,174752.000,A,3637.060059,S,6416.2354,W,0.00,0.00,030812,,,A*55,F,,imei:861785000249353,05,180.6,Battery=100%,,1,722,310,0FA6,39D0;8F"));
diff --git a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
index 620c43115..d0fdebc03 100644
--- a/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
@@ -11,7 +11,7 @@ public class MeiligaoProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(null);
+ MeiligaoProtocolDecoder decoder = new MeiligaoProtocolDecoder(new MeiligaoProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"24240000123456FFFFFFFF50008B9B0D0A"))));
diff --git a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
index 6c3aa1b46..1bbf5e0dc 100644
--- a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class MeitrackProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(null);
+ MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(new MeitrackProtocol());
verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer(
"$$G145,862106024274815,AAA,35,-1.287125,36.906061,150530054639,A,10,13,12,67,0.8,1621,38359791,42330881,639|2|FB2|2F3,0000,3|0|0|A58|432,,,1,0009,*26", Charset.defaultCharset())));
diff --git a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
index 32bcfe30c..b9f62a8dd 100644
--- a/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class MiniFinderProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MiniFinderProtocolDecoder decoder = new MiniFinderProtocolDecoder(null);
+ MiniFinderProtocolDecoder decoder = new MiniFinderProtocolDecoder(new MiniFinderProtocol());
assertNull(decoder.decode(null, null, "!1,860719020212696"));
diff --git a/test/org/traccar/protocol/MtxProtocolDecoderTest.java b/test/org/traccar/protocol/MtxProtocolDecoderTest.java
index 2d027cbf8..d0e50295d 100644
--- a/test/org/traccar/protocol/MtxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MtxProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class MtxProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MtxProtocolDecoder decoder = new MtxProtocolDecoder(null);
+ MtxProtocolDecoder decoder = new MtxProtocolDecoder(new MtxProtocol());
verify(decoder.decode(null, null,
"#MTX,353815011138124,20101226,195550,41.6296399,002.3611174,000,035,000000.00,X,X,1111,000,0,0"));
diff --git a/test/org/traccar/protocol/MxtProtocolDecoderTest.java b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
index b667957da..07e27927e 100644
--- a/test/org/traccar/protocol/MxtProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
@@ -11,7 +11,7 @@ public class MxtProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- MxtProtocolDecoder decoder = new MxtProtocolDecoder(null);
+ MxtProtocolDecoder decoder = new MxtProtocolDecoder(new MxtProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"01a631361e7a00082471418b052a2c46b587ffc01ae3fd000008800000000000003345422203000000f000f00000000000ea1e04"))));
diff --git a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
index ab72d887f..4b8b7ef33 100644
--- a/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class NavigilProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(null);
+ NavigilProtocolDecoder decoder = new NavigilProtocolDecoder(new NavigilProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"01004300040020000000f60203080200e7cd0f510c0000003b00000000000000"))));
diff --git a/test/org/traccar/protocol/NavisProtocolDecoderTest.java b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
index bdc656b10..8cd4d951b 100644
--- a/test/org/traccar/protocol/NavisProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NavisProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class NavisProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- NavisProtocolDecoder decoder = new NavisProtocolDecoder(null);
+ NavisProtocolDecoder decoder = new NavisProtocolDecoder(new NavisProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"404E5443010000007B000000130044342A3E533A383631373835303035323035303739"))));
diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
index e51741835..8b1e5d2b2 100644
--- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class NoranProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- NoranProtocolDecoder decoder = new NoranProtocolDecoder(null);
+ NoranProtocolDecoder decoder = new NoranProtocolDecoder(new NoranProtocol());
verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"3400080001090000000000001D43A29BE842E62520424E523039423036363932000031322D30332D30352031313A34373A343300"))));
diff --git a/test/org/traccar/protocol/OrionProtocolDecoderTest.java b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
index 66243ecf3..cd38ff815 100644
--- a/test/org/traccar/protocol/OrionProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/OrionProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class OrionProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- OrionProtocolDecoder decoder = new OrionProtocolDecoder(null);
+ OrionProtocolDecoder decoder = new OrionProtocolDecoder(new OrionProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"5057000137bf6236235a0331b5c6e402a3b5ecff5102980003000e0c1d172936080e0c1d172936b03b01000882050000008e080000000000008c0300940500000084030085030003067600900113150000000000000000000000000000000000000004a4c8"))));
diff --git a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
index 0d20dc959..c7935b90f 100644
--- a/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/OsmAndProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class OsmAndProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(null);
+ OsmAndProtocolDecoder decoder = new OsmAndProtocolDecoder(new OsmAndProtocol());
verify(decoder.decode(null, null, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
"/?lat=49.60688&lon=6.15788&timestamp=2014-06-04+09%3A10%3A11&altitude=384.7&speed=0.0&id=353861053849681")));
diff --git a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
index 354606817..e6bc75713 100644
--- a/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/PiligrimProtocolDecoderTest.java
@@ -16,7 +16,7 @@ public class PiligrimProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- PiligrimProtocolDecoder decoder = new PiligrimProtocolDecoder(null);
+ PiligrimProtocolDecoder decoder = new PiligrimProtocolDecoder(new PiligrimProtocol());
HttpRequest msg1 = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, "/bingps?imei=868204005544720&csq=18&vout=00&vin=4050&dataid=00000000");
msg1.setContent(ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
diff --git a/test/org/traccar/protocol/ProgressProtocolDecoderTest.java b/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
index e12f96279..336f64257 100644
--- a/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/ProgressProtocolDecoderTest.java
@@ -15,7 +15,7 @@ public class ProgressProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- ProgressProtocolDecoder decoder = new ProgressProtocolDecoder(null);
+ ProgressProtocolDecoder decoder = new ProgressProtocolDecoder(new ProgressProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"020037000100000003003131310f003335343836383035313339303036320f00323530303136333832383531353535010000000100000000000000e6bb97b6"))));
diff --git a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
index 22c1d5069..02046bd8d 100644
--- a/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Pt3000ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Pt3000ProtocolDecoder decoder = new Pt3000ProtocolDecoder(null);
+ Pt3000ProtocolDecoder decoder = new Pt3000ProtocolDecoder(new Pt3000Protocol());
verify(decoder.decode(null, null,
"%356939010012099,$GPRMC,124945.752,A,4436.6245,N,01054.4634,E,0.11,358.52,060408,,,A,+393334347445,N028d"));
diff --git a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java
index 83ddef991..1987a3180 100644
--- a/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Pt502ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Pt502ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Pt502ProtocolDecoder decoder = new Pt502ProtocolDecoder(null);
+ Pt502ProtocolDecoder decoder = new Pt502ProtocolDecoder(new Pt502Protocol());
verify(decoder.decode(null, null,
"$POS,11023456,033731.000,A,0335.2617,N,09841.1587,E,0.00,88.12,210615,,,A/0000,0/1f8/388900//f33//"));
diff --git a/test/org/traccar/protocol/RitiProtocolDecoderTest.java b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
index d94772cd8..053169ae3 100644
--- a/test/org/traccar/protocol/RitiProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/RitiProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class RitiProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- RitiProtocolDecoder decoder = new RitiProtocolDecoder(null);
+ RitiProtocolDecoder decoder = new RitiProtocolDecoder(new RitiProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"3b2864a3056300006d40000003000000000000000000000000244750524d432c3231313734332e3030302c412c313335372e333637352c4e2c31303033362e363939322c452c302e30302c2c3031303931342c2c2c412a37380d0a00000000000000000000000000000000040404"))));
diff --git a/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java b/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java
index 76c738251..2012edc76 100644
--- a/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/RuptelaProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class RuptelaProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- RuptelaProtocolDecoder decoder = new RuptelaProtocolDecoder(null);
+ RuptelaProtocolDecoder decoder = new RuptelaProtocolDecoder(new RuptelaProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"00560003116e7438a7a50100015565cbb9000020fd21300f113f4600005f000600090d090805011b13cf00020003001c012029ad00041d31dd1e0ebd160000c50000047200000000d0000000004100016a2a960000a5a300c9ee"))));
diff --git a/test/org/traccar/protocol/SanavProtocolDecoderTest.java b/test/org/traccar/protocol/SanavProtocolDecoderTest.java
index c7b1335a1..f7f33843e 100644
--- a/test/org/traccar/protocol/SanavProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SanavProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class SanavProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- SanavProtocolDecoder decoder = new SanavProtocolDecoder(null);
+ SanavProtocolDecoder decoder = new SanavProtocolDecoder(new SanavProtocol());
verify(decoder.decode(null, null,
"imei=352024028982787&rmc=$GPRMC,103048.000,A,4735.0399,N,01905.2895,E,0.00,0.00,171013,,*05,AUTO-4095mv"));
diff --git a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
index 942ada8b4..0612d1243 100644
--- a/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
@@ -11,7 +11,7 @@ public class SkypatrolProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- SkypatrolProtocolDecoder decoder = new SkypatrolProtocolDecoder(null);
+ SkypatrolProtocolDecoder decoder = new SkypatrolProtocolDecoder(new SkypatrolProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"0005021004FFFFFFFF0000000D313134373735383300CB000000000E11070C010184D032FB3841370000000016072B000017050032000000000000024E0C071116072C105900050000000000050000000000050000000003100260B7363B6306C11A00B73637F206BF19B73637F106B50EB73638B106BB0BB7363B6106B80AB73637F306B709000000000000000000C"))));
diff --git a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
index 4b3ec36fb..75241c903 100644
--- a/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Stl060ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Stl060ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Stl060ProtocolDecoder decoder = new Stl060ProtocolDecoder(null);
+ Stl060ProtocolDecoder decoder = new Stl060ProtocolDecoder(new Stl060Protocol());
verify(decoder.decode(null, null,
"$1,357804048043099,D001,AP29AW0963,23/02/14,14:06:54,17248488N,078342226E,0.08,193.12,1,1,1,1,1,A"));
diff --git a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java
index 96bf1ea95..3912f4887 100644
--- a/test/org/traccar/protocol/SuntechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SuntechProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class SuntechProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(null);
+ SuntechProtocolDecoder decoder = new SuntechProtocolDecoder(new SuntechProtocol());
assertNull(decoder.decode(null, null, "SA200ALV;317652"));
diff --git a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
index 1aef656e0..e7ede632b 100644
--- a/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/SyrusProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class SyrusProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- SyrusProtocolDecoder decoder = new SyrusProtocolDecoder(null, false);
+ SyrusProtocolDecoder decoder = new SyrusProtocolDecoder(new SyrusProtocol(), false);
verify(decoder.decode(null, null,
">RGP230615010248-2682523-065236820000003007F4101;ID=0005;#0002;*2A<"));
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
index 4a61fa6fa..9de54bbd4 100644
--- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class T55ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- T55ProtocolDecoder decoder = new T55ProtocolDecoder(null);
+ T55ProtocolDecoder decoder = new T55ProtocolDecoder(new T55Protocol());
assertNull(decoder.decode(null, null, "$GPFID,ID123456ABC"));
diff --git a/test/org/traccar/protocol/TelikProtocolDecoderTest.java b/test/org/traccar/protocol/TelikProtocolDecoderTest.java
index dff2f9489..07b48a2b7 100644
--- a/test/org/traccar/protocol/TelikProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TelikProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class TelikProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TelikProtocolDecoder decoder = new TelikProtocolDecoder(null);
+ TelikProtocolDecoder decoder = new TelikProtocolDecoder(new TelikProtocol());
assertNull(decoder.decode(null, null,
"0026436729|232|01|003002030"));
diff --git a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
index db151e65c..14031527e 100644
--- a/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class TeltonikaProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TeltonikaProtocolDecoder decoder = new TeltonikaProtocolDecoder(null);
+ TeltonikaProtocolDecoder decoder = new TeltonikaProtocolDecoder(new TeltonikaProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"000F313233343536373839303132333435"))));
diff --git a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
index 7cdb48a9b..a7df4d5e1 100644
--- a/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tk102ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Tk102ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Tk102ProtocolDecoder decoder = new Tk102ProtocolDecoder(null);
+ Tk102ProtocolDecoder decoder = new Tk102ProtocolDecoder(new Tk102Protocol());
assertNull(decoder.decode(null, null, ""));
diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
index 18e6142ad..223df8b56 100644
--- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Tk103ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(null);
+ Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new Tk103Protocol());
assertNull(decoder.decode(null, null, "(090411121854BP0000001234567890HSO"));
diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index 5473f6774..ccc1ce603 100644
--- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Tlt2hProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(null);
+ Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(new Tlt2hProtocol());
verify(decoder.decode(null, null,
"#357671030946351#V500#0000#AUTO#1\r\n" +
diff --git a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
index 1804b335c..d0cf08f8a 100644
--- a/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TopflytechProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class TopflytechProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TopflytechProtocolDecoder decoder = new TopflytechProtocolDecoder(null);
+ TopflytechProtocolDecoder decoder = new TopflytechProtocolDecoder(new TopflytechProtocol());
verify(decoder.decode(null, null,
"(880316890094910BP00XG00b600000000L00074b54S00000000R0C0F0014000100f0130531152205A0706.1395S11024.0965E000.0251.25"));
diff --git a/test/org/traccar/protocol/TotemProtocolDecoderTest.java b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
index bd66c7677..97f78d901 100644
--- a/test/org/traccar/protocol/TotemProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TotemProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class TotemProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TotemProtocolDecoder decoder = new TotemProtocolDecoder(null);
+ TotemProtocolDecoder decoder = new TotemProtocolDecoder(new TotemProtocol());
verify(decoder.decode(null, null,
"$$AE860990002922822|AA$GPRMC,051002.00,A,0439.26245,N,10108.94448,E,0.023,,140315,,,A*71|02.98|01.95|02.26|000000000000|20150314051003|13841157|105A3B1C|0000|0.0000|0005|5324"));
diff --git a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
index 669e84f53..6826b2f32 100644
--- a/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tr20ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Tr20ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Tr20ProtocolDecoder decoder = new Tr20ProtocolDecoder(null);
+ Tr20ProtocolDecoder decoder = new Tr20ProtocolDecoder(new Tr20Protocol());
assertNull(decoder.decode(null, null, "%%TRACKPRO01,1"));
diff --git a/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java b/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
index c8cd8d99c..57044a778 100644
--- a/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Tr900ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Tr900ProtocolDecoder decoder = new Tr900ProtocolDecoder(null);
+ Tr900ProtocolDecoder decoder = new Tr900ProtocolDecoder(new Tr900Protocol());
verify(decoder.decode(null, null, null,
">00001001,4,1,150626,131252,W05830.2978,S3137.2783,,00,348,18,00,003-000,0,3,11111011*3b!"));
diff --git a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
index 4319a1eed..6728fe787 100644
--- a/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TrackboxProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class TrackboxProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TrackboxProtocolDecoder decoder = new TrackboxProtocolDecoder(null);
+ TrackboxProtocolDecoder decoder = new TrackboxProtocolDecoder(new TrackboxProtocol());
assertNull(decoder.decode(null, null, "a=connect&v=11&i=111111111111111"));
diff --git a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
index f2cdf3332..c24b85590 100644
--- a/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TramigoProtocolDecoderTest.java
@@ -15,7 +15,7 @@ public class TramigoProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TramigoProtocolDecoder decoder = new TramigoProtocolDecoder(null);
+ TramigoProtocolDecoder decoder = new TramigoProtocolDecoder(new TramigoProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"8000011bb0009e0001015b93032ef6f35994a9545472616d69676f3a204d6f76696e672c20302e3930206b6d205345206f66204372616e6562726f6f6b20466972652053746174696f6e2c2050656e726974682c205379646e65792c2041552c202d33332e37303732322c203135302e37313735392c2053452077697468207370656564203337206b6d2f682c2031393a3438204a616e20342020454f46"))));
diff --git a/test/org/traccar/protocol/TytanProtocolDecoderTest.java b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
index e32838adc..b99f2a6eb 100644
--- a/test/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- TytanProtocolDecoder decoder = new TytanProtocolDecoder(null);
+ TytanProtocolDecoder decoder = new TytanProtocolDecoder(new TytanProtocol());
verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"d5300000689d65556877fbd437a09d8ea89360005a23124e410201213704000907000009ffffffffffffffff0affffffffffffffff18ff63ff7f7fff65ff66ff67ff68ff69ff6b00ff6cffffffff6dff7fffffffff81ffffffff82ffff83ffffffffffffffff88ffff9600"))));
diff --git a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
index fca2e4bd6..e703e078a 100644
--- a/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class UlbotechProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(null);
+ UlbotechProtocolDecoder decoder = new UlbotechProtocolDecoder(new UlbotechProtocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"f8010103545500500179009ccb4b62010e00144db906310d3f0000000000cb0304000000000404000a8123050603211860221006080000000100000000ef97f8"))));
diff --git a/test/org/traccar/protocol/V680ProtocolDecoderTest.java b/test/org/traccar/protocol/V680ProtocolDecoderTest.java
index 07359f890..7cba4e965 100644
--- a/test/org/traccar/protocol/V680ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/V680ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class V680ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- V680ProtocolDecoder decoder = new V680ProtocolDecoder(null);
+ V680ProtocolDecoder decoder = new V680ProtocolDecoder(new V680Protocol());
assertNull(decoder.decode(null, null,
"#353588102019155"));
diff --git a/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java
index 19e9b3287..5d1879193 100644
--- a/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/VisiontekProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class VisiontekProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- VisiontekProtocolDecoder decoder = new VisiontekProtocolDecoder(null);
+ VisiontekProtocolDecoder decoder = new VisiontekProtocolDecoder(new VisiontekProtocol());
//verify(decoder.decode(null, null,
// "$1,AP116,05,06,15,11,48,32,1725.0460N,07824.5289E,0617,07,0,030,2091,0,0,0,1,1,1,1,20,00.0000,00.3820,00.0000,VAJRA V1.00,A#"));
diff --git a/test/org/traccar/protocol/WialonProtocolDecoderTest.java b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
index 25d61b363..3dd1f24f7 100644
--- a/test/org/traccar/protocol/WialonProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WialonProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class WialonProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- WialonProtocolDecoder decoder = new WialonProtocolDecoder(null);
+ WialonProtocolDecoder decoder = new WialonProtocolDecoder(new WialonProtocol());
assertNull(decoder.decode(null, null, "#L#123456789012345;test"));
diff --git a/test/org/traccar/protocol/WondexProtocolDecoderTest.java b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
index 45f72dd8a..dc90a0b71 100644
--- a/test/org/traccar/protocol/WondexProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/WondexProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class WondexProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- WondexProtocolDecoder decoder = new WondexProtocolDecoder(null);
+ WondexProtocolDecoder decoder = new WondexProtocolDecoder(new WondexProtocol());
verify(decoder.decode(null, null,
"1044989601,20130323074605,0.000000,90.000000,0,000,0,0,2"));
diff --git a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
index d5c5328d4..6fa23943f 100644
--- a/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Xexun2ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Xexun2ProtocolDecoder decoder = new Xexun2ProtocolDecoder(null);
+ Xexun2ProtocolDecoder decoder = new Xexun2ProtocolDecoder(new XexunProtocol());
assertNull(decoder.decode(null, null,
",+48606717068,,L,, imei:012207005047292,,,F:4.28V,1,52,11565,247,01,000E,1FC5"));
diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
index cf66928da..879771126 100644
--- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class XexunProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- XexunProtocolDecoder decoder = new XexunProtocolDecoder(null);
+ XexunProtocolDecoder decoder = new XexunProtocolDecoder(new XexunProtocol());
verify(decoder.decode(null, null,
"GPRMC,043435.000,A,811.299200,S,11339.9500,E,0.93,29.52,160313,00,0000.0,A*65,F,,imei:359585014597923,"));
diff --git a/test/org/traccar/protocol/XirgoProtocolDecoderTest.java b/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
index 4e6670837..cddd29f8c 100644
--- a/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class XirgoProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- XirgoProtocolDecoder decoder = new XirgoProtocolDecoder(null);
+ XirgoProtocolDecoder decoder = new XirgoProtocolDecoder(new XirgoProtocol());
verify(decoder.decode(null, null, null,
"$$357207059646786,4003,2015/05/19,15:54:56,-20.21422,-70.14927,37.5,1.8,0.0,11,0.8,12.9,31,297,1,0,0.0,0.0,0,1,1,1##"));
diff --git a/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java b/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
index c7ef44607..bf93b895f 100644
--- a/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xt013ProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class Xt013ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Xt013ProtocolDecoder decoder = new Xt013ProtocolDecoder(null);
+ Xt013ProtocolDecoder decoder = new Xt013ProtocolDecoder(new Xt013Protocol());
verify(decoder.decode(null, null,
"TK,862950021650364,150131090859,+53.267863,+5.767363,0,38,12,0,F,204,08,C94,336C,24,,4.09,1,,,,,,,,"));
diff --git a/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java b/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java
index b2be6fa48..253579783 100644
--- a/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Xt7ProtocolDecoderTest.java
@@ -13,7 +13,7 @@ public class Xt7ProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- Xt7ProtocolDecoder decoder = new Xt7ProtocolDecoder(null);
+ Xt7ProtocolDecoder decoder = new Xt7ProtocolDecoder(new Xt7Protocol());
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"53545832303130313031383031202020202020026A244750524D432C3130313035332E3030302C412C323233322E373630372C4E2C31313430342E373636392C452C302E30302C2C3233313131302C2C2C412A37462C3436302C30302C323739352C304536412C31342C39342C313030302C303030302C39312C54696D65723B31440D0A"))));
diff --git a/test/org/traccar/protocol/YwtProtocolDecoderTest.java b/test/org/traccar/protocol/YwtProtocolDecoderTest.java
index 30d8091a8..678a46041 100644
--- a/test/org/traccar/protocol/YwtProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/YwtProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class YwtProtocolDecoderTest extends ProtocolDecoderTest {
@Test
public void testDecode() throws Exception {
- YwtProtocolDecoder decoder = new YwtProtocolDecoder(null);
+ YwtProtocolDecoder decoder = new YwtProtocolDecoder(new YwtProtocol());
assertNull(decoder.decode(null, null,
"%SN,0417061042:0,0,140117041203,404"));