aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-30 14:04:24 -0700
commit014cf82a9e63a36e944e293932f9edf27e452919 (patch)
tree7ac5899f535fbf47e66dc1321738c951473a009b
parentce661ec77a957b70c15509c6801e6f34b32ad11d (diff)
downloadtrackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.gz
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.tar.bz2
trackermap-server-014cf82a9e63a36e944e293932f9edf27e452919.zip
No context dependency for decoder
-rw-r--r--src/main/java/org/traccar/BaseProtocolDecoder.java42
-rw-r--r--src/main/java/org/traccar/Main.java2
-rw-r--r--src/main/java/org/traccar/model/BaseModel.java6
-rw-r--r--src/main/java/org/traccar/model/CellTower.java14
-rw-r--r--src/main/java/org/traccar/protocol/AplicomProtocolDecoder.java3
-rw-r--r--src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java16
-rw-r--r--src/main/java/org/traccar/protocol/Avl301ProtocolDecoder.java2
-rw-r--r--src/main/java/org/traccar/protocol/CastelProtocolDecoder.java4
-rw-r--r--src/main/java/org/traccar/protocol/EsealProtocolDecoder.java9
-rw-r--r--src/main/java/org/traccar/protocol/GenxProtocolDecoder.java7
-rw-r--r--src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java11
-rw-r--r--src/main/java/org/traccar/protocol/GlobalSatProtocolDecoder.java8
-rw-r--r--src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java3
-rw-r--r--src/main/java/org/traccar/protocol/H02ProtocolDecoder.java6
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java3
-rw-r--r--src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java7
-rw-r--r--src/main/java/org/traccar/protocol/OrbcommProtocol.java3
-rw-r--r--src/main/java/org/traccar/protocol/OrbcommProtocolPoller.java12
-rw-r--r--src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java9
-rw-r--r--src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java9
-rw-r--r--src/main/java/org/traccar/protocol/TechTltProtocolDecoder.java2
-rw-r--r--src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java11
-rw-r--r--src/main/java/org/traccar/protocol/ThinkRaceProtocolDecoder.java2
-rw-r--r--src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java9
-rw-r--r--src/main/java/org/traccar/protocol/TotemProtocolDecoder.java6
-rw-r--r--src/main/java/org/traccar/protocol/TzoneProtocolDecoder.java5
-rw-r--r--src/main/java/org/traccar/protocol/XirgoProtocolDecoder.java7
-rw-r--r--src/main/java/org/traccar/protocol/Xt2400ProtocolDecoder.java6
-rw-r--r--src/test/java/org/traccar/BaseTest.java30
-rw-r--r--src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AisProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AlematicsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AnytrekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ApelProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AplicomFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AplicomProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AppelloProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AquilaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Ardi01ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ArknavProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ArmoliProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java8
-rw-r--r--src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AstraProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/At2000FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AtrackFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/AuroProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AustinNbProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AutoFonProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AutoGradeProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AutoTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/AvemaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Avl301ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/B2316ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/BceProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/BlackKiteProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/BlueProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/C2stekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CalAmpProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CarTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CarscopProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CastelProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CautelaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CguardProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CityeasyProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ContinentalProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/CradlepointProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DingtekFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DingtekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DishaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DmtProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DolphinProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DualcamFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DualcamProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/DwayProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EelinkProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EgtsFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EgtsProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/EnforaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EnvotechProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EskyFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ExtremTracProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FifotrackFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FlespiProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FlexApiProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FlexCommProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FlexibleReportProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FlextrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FoxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FreedomProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FreematicsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FutureWayFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/FutureWayProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GalileoFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GalileoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GatorProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GenxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gl100ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gl200BinaryProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gl200FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GlobalSatProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GnxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GoSafeProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gps056FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gps056ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GpsGateProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GpsMarkerProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GpsmtaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GranitFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/GranitProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gs100ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gt06FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Gt30ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/H02FrameDecoderTest.java6
-rw-r--r--src/test/java/org/traccar/protocol/H02ProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/HaicomProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HomtecsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HuaShengFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HuabaoFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/HunterProProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/IdplProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/IntellitracProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ItsFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Ivt401ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/JidoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/JpKorjarProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/JsonFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Jt600FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Jt600ProtocolDecoderTest.java2
-rwxr-xr-xsrc/test/java/org/traccar/protocol/KenjiProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/KhdProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/L100FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/L100ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/M2cProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MaestroProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ManPowerProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Mavlink2ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MegastekFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MeiligaoFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MeiligaoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MeitrackFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MeitrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/MilesmateProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MiniFinderProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MotorProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MtxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/MxtProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NavigilProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NavisProtocolDecoderTest.java6
-rw-r--r--src/test/java/org/traccar/protocol/NavisetFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NavtelecomFrameDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/NavtelecomProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NeosProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NetProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NiotProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NoranProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NvsFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NvsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/NyitechProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ObdDongleProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OigoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OkoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OpenGtsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OrionProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OsmAndProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/OwnTracksProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PathAwayProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PiligrimProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PluginProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PolteProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PortmanProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PretraceProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PricolProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ProgressProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PstFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Pt215ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Pt3000ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Pt502FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Pt502ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Pt60ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/R12wProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RaceDynamicsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RadarProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RaveonProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RecodaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RetranslatorProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RitiProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RoboTrackFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RoboTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/RuptelaProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SabertekFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SabertekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SanavProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SatsolProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SigfoxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SiwiProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SkypatrolProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SmartSoleProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SmokeyProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SolarPoweredProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SpotProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/StarcomProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/StartekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/StbProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Stl060ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SuntechFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SuntechProtocolDecoderTest.java12
-rwxr-xr-xsrc/test/java/org/traccar/protocol/SupermateProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SviasProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/SwiftechProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/T55ProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/T57FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/T57ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TechTltProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TechtoCruzFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TekFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TelemaxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TelicFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TeltonikaFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java6
-rw-r--r--src/test/java/org/traccar/protocol/TeraTrackProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/ThinkRaceProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tk102ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tk103FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TlvProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TmgFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TmgProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TopflytechProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TotemFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TotemProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tr20ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tr900ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TrackboxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TrakMateProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TramigoFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TramigoProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TrvProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Tt8850ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TytanProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/TzoneProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/UuxProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/V680ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/VisiontekProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/VnetProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Vt200FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/VtfmsFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/VtfmsProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WatchFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WatchProtocolDecoderTest.java4
-rw-r--r--src/test/java/org/traccar/protocol/WialonProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WliFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WliProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WondexFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WondexProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/WristbandProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Xexun2FrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Xexun2ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/XexunFrameDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/XexunProtocolDecoderTest.java11
-rw-r--r--src/test/java/org/traccar/protocol/XirgoProtocolDecoderTest.java6
-rw-r--r--src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Xt013ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/Xt2400ProtocolDecoderTest.java2
-rw-r--r--src/test/java/org/traccar/protocol/YwtProtocolDecoderTest.java2
323 files changed, 495 insertions, 402 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java
index 505e7926f..0f62c87df 100644
--- a/src/main/java/org/traccar/BaseProtocolDecoder.java
+++ b/src/main/java/org/traccar/BaseProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,17 +50,47 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
private static final String PROTOCOL_UNKNOWN = "unknown";
- private final Config config = Context.getConfig();
- private final IdentityManager identityManager = Context.getIdentityManager();
- private final ConnectionManager connectionManager = Context.getConnectionManager();
- private final StatisticsManager statisticsManager;
private final Protocol protocol;
+ private Config config;
+ private IdentityManager identityManager;
+ private ConnectionManager connectionManager;
+ private StatisticsManager statisticsManager;
private MediaManager mediaManager;
public BaseProtocolDecoder(Protocol protocol) {
this.protocol = protocol;
- statisticsManager = Main.getInjector() != null ? Main.getInjector().getInstance(StatisticsManager.class) : null;
+ }
+
+ /**
+ * Method called when config is initialized.
+ */
+ protected void init() {
+ }
+
+ public Config getConfig() {
+ return config;
+ }
+
+ @Inject
+ public void setConfig(Config config) {
+ this.config = config;
+ init();
+ }
+
+ @Inject
+ public void setIdentityManager(IdentityManager identityManager) {
+ this.identityManager = identityManager;
+ }
+
+ @Inject
+ public void setConnectionManager(ConnectionManager connectionManager) {
+ this.connectionManager = connectionManager;
+ }
+
+ @Inject
+ public void setStatisticsManager(StatisticsManager statisticsManager) {
+ this.statisticsManager = statisticsManager;
}
@Inject
diff --git a/src/main/java/org/traccar/Main.java b/src/main/java/org/traccar/Main.java
index 2eaf394af..016365837 100644
--- a/src/main/java/org/traccar/Main.java
+++ b/src/main/java/org/traccar/Main.java
@@ -110,8 +110,8 @@ public final class Main {
public static void run(String configFile) {
try {
- Context.init(configFile);
injector = Guice.createInjector(new MainModule());
+ Context.init(configFile);
logSystemInfo();
LOGGER.info("Version: " + Main.class.getPackage().getImplementationVersion());
LOGGER.info("Starting server...");
diff --git a/src/main/java/org/traccar/model/BaseModel.java b/src/main/java/org/traccar/model/BaseModel.java
index 8bdb916e8..acde0f83d 100644
--- a/src/main/java/org/traccar/model/BaseModel.java
+++ b/src/main/java/org/traccar/model/BaseModel.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017 Anton Tananaev (anton@traccar.org)
+ * Copyright 2017 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2017 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,11 +20,11 @@ public class BaseModel {
private long id;
- public final long getId() {
+ public long getId() {
return id;
}
- public final void setId(long id) {
+ public void setId(long id) {
this.id = id;
}
diff --git a/src/main/java/org/traccar/model/CellTower.java b/src/main/java/org/traccar/model/CellTower.java
index 254487471..af33b1f5c 100644
--- a/src/main/java/org/traccar/model/CellTower.java
+++ b/src/main/java/org/traccar/model/CellTower.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
package org.traccar.model;
import com.fasterxml.jackson.annotation.JsonInclude;
-import org.traccar.Context;
+import org.traccar.config.Config;
import org.traccar.config.Keys;
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -37,14 +37,12 @@ public class CellTower {
return cellTower;
}
- public static CellTower fromLacCid(int lac, long cid) {
- return from(
- Context.getConfig().getInteger(Keys.GEOLOCATION_MCC),
- Context.getConfig().getInteger(Keys.GEOLOCATION_MCC), lac, cid);
+ public static CellTower fromLacCid(Config config, int lac, long cid) {
+ return from(config.getInteger(Keys.GEOLOCATION_MCC), config.getInteger(Keys.GEOLOCATION_MCC), lac, cid);
}
- public static CellTower fromCidLac(long cid, int lac) {
- return fromLacCid(lac, cid);
+ public static CellTower fromCidLac(Config config, long cid, int lac) {
+ return fromLacCid(config, lac, cid);
}
private String radioType;
diff --git a/src/main/java/org/traccar/protocol/AplicomProtocolDecoder.java b/src/main/java/org/traccar/protocol/AplicomProtocolDecoder.java
index f11312428..692a2058a 100644
--- a/src/main/java/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -21,7 +21,6 @@ import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.Protocol;
import org.traccar.config.Keys;
@@ -303,7 +302,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
decodeEventData(position, buf, event);
}
- if (Context.getConfig().getBoolean(Keys.PROTOCOL_CAN.withPrefix(getProtocolName()))
+ if (getConfig().getBoolean(Keys.PROTOCOL_CAN.withPrefix(getProtocolName()))
&& buf.isReadable() && (selector & 0x1000) != 0 && event == EVENT_DATA) {
decodeCanData(buf, position);
}
diff --git a/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java
index 247a1b696..9a5d537ef 100644
--- a/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -20,7 +20,6 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -54,7 +53,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
private static final int MIN_DATA_LENGTH = 40;
private boolean longDate;
- private final boolean decimalFuel;
+ private boolean decimalFuel;
private boolean custom;
private String form;
@@ -64,17 +63,20 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
public AtrackProtocolDecoder(Protocol protocol) {
super(protocol);
+ }
- longDate = Context.getConfig().getBoolean(Keys.PROTOCOL_LONG_DATE.withPrefix(getProtocolName()));
- decimalFuel = Context.getConfig().getBoolean(Keys.PROTOCOL_DECIMAL_FUEL.withPrefix(getProtocolName()));
+ @Override
+ protected void init() {
+ longDate = getConfig().getBoolean(Keys.PROTOCOL_LONG_DATE.withPrefix(getProtocolName()));
+ decimalFuel = getConfig().getBoolean(Keys.PROTOCOL_DECIMAL_FUEL.withPrefix(getProtocolName()));
- custom = Context.getConfig().getBoolean(Keys.PROTOCOL_CUSTOM.withPrefix(getProtocolName()));
- form = Context.getConfig().getString(Keys.PROTOCOL_FORM.withPrefix(getProtocolName()));
+ custom = getConfig().getBoolean(Keys.PROTOCOL_CUSTOM.withPrefix(getProtocolName()));
+ form = getConfig().getString(Keys.PROTOCOL_FORM.withPrefix(getProtocolName()));
if (form != null) {
custom = true;
}
- String alarmMapString = Context.getConfig().getString(Keys.PROTOCOL_ALARM_MAP.withPrefix(getProtocolName()));
+ String alarmMapString = getConfig().getString(Keys.PROTOCOL_ALARM_MAP.withPrefix(getProtocolName()));
if (alarmMapString != null) {
for (String pair : alarmMapString.split(",")) {
if (!pair.isEmpty()) {
diff --git a/src/main/java/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Avl301ProtocolDecoder.java
index f6b7db2d6..9f6ded26a 100644
--- a/src/main/java/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -125,7 +125,7 @@ public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
}
position.setNetwork(new Network(
- CellTower.fromLacCid(buf.readUnsignedShort(), buf.readUnsignedMedium())));
+ CellTower.fromLacCid(getConfig(), buf.readUnsignedShort(), buf.readUnsignedMedium())));
position.set(Position.KEY_ALARM, Position.ALARM_GENERAL);
int flags = buf.readUnsignedByte();
diff --git a/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java b/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
index 23401b5ee..85ac29336 100644
--- a/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/CastelProtocolDecoder.java
@@ -443,7 +443,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
decodeStat(position, buf);
position.setNetwork(new Network(
- CellTower.fromLacCid(buf.readUnsignedShortLE(), buf.readUnsignedShortLE())));
+ CellTower.fromLacCid(getConfig(), buf.readUnsignedShortLE(), buf.readUnsignedShortLE())));
return position;
@@ -499,7 +499,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // additional flags
position.setNetwork(new Network(
- CellTower.fromLacCid(buf.readUnsignedShortLE(), buf.readUnsignedShortLE())));
+ CellTower.fromLacCid(getConfig(), buf.readUnsignedShortLE(), buf.readUnsignedShortLE())));
positions.add(position);
}
diff --git a/src/main/java/org/traccar/protocol/EsealProtocolDecoder.java b/src/main/java/org/traccar/protocol/EsealProtocolDecoder.java
index 0a12f781d..27fcf1394 100644
--- a/src/main/java/org/traccar/protocol/EsealProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EsealProtocolDecoder.java
@@ -17,7 +17,6 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -32,11 +31,15 @@ import java.util.regex.Pattern;
public class EsealProtocolDecoder extends BaseProtocolDecoder {
- private final String config;
+ private String config;
public EsealProtocolDecoder(Protocol protocol) {
super(protocol);
- config = Context.getConfig().getString(Keys.PROTOCOL_CONFIG.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ config = getConfig().getString(Keys.PROTOCOL_CONFIG.withPrefix(getProtocolName()));
}
private static final Pattern PATTERN = new PatternBuilder()
diff --git a/src/main/java/org/traccar/protocol/GenxProtocolDecoder.java b/src/main/java/org/traccar/protocol/GenxProtocolDecoder.java
index 2ae9de7a0..b787b7467 100644
--- a/src/main/java/org/traccar/protocol/GenxProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/GenxProtocolDecoder.java
@@ -17,7 +17,6 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.Protocol;
import org.traccar.helper.UnitsConverter;
@@ -32,7 +31,11 @@ public class GenxProtocolDecoder extends BaseProtocolDecoder {
public GenxProtocolDecoder(Protocol protocol) {
super(protocol);
- setReportColumns(Context.getConfig().getString(getProtocolName() + ".reportColumns", "1,2,3,4"));
+ }
+
+ @Override
+ protected void init() {
+ setReportColumns(getConfig().getString(getProtocolName() + ".reportColumns", "1,2,3,4"));
}
public void setReportColumns(String format) {
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
index 280986165..72d3ef592 100644
--- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -16,7 +16,6 @@
package org.traccar.protocol;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -46,11 +45,15 @@ import java.util.regex.Pattern;
public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
- private final boolean ignoreFixTime;
+ private boolean ignoreFixTime;
public Gl200TextProtocolDecoder(Protocol protocol) {
super(protocol);
- ignoreFixTime = Context.getConfig().getBoolean(Keys.PROTOCOL_IGNORE_FIX_TIME.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ ignoreFixTime = getConfig().getBoolean(Keys.PROTOCOL_IGNORE_FIX_TIME.withPrefix(getProtocolName()));
}
private static final Pattern PATTERN_ACK = new PatternBuilder()
@@ -1333,7 +1336,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
}
}
- if (channel != null && Context.getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
+ if (channel != null && getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
String checksum;
if (sentence.endsWith("$")) {
checksum = sentence.substring(sentence.length() - 1 - 4, sentence.length() - 1);
diff --git a/src/main/java/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/main/java/org/traccar/protocol/GlobalSatProtocolDecoder.java
index b48df4047..d5c834284 100644
--- a/src/main/java/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -17,7 +17,6 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -40,9 +39,12 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
public GlobalSatProtocolDecoder(Protocol protocol) {
super(protocol);
+ }
- format0 = Context.getConfig().getString(getProtocolName() + ".format0", "TSPRXAB27GHKLMnaicz*U!");
- format1 = Context.getConfig().getString(getProtocolName() + ".format1", "SARY*U!");
+ @Override
+ protected void init() {
+ format0 = getConfig().getString(getProtocolName() + ".format0", "TSPRXAB27GHKLMnaicz*U!");
+ format1 = getConfig().getString(getProtocolName() + ".format1", "SARY*U!");
}
public void setFormat0(String format) {
diff --git a/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
index d5aa45b9c..510f5eca2 100644
--- a/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -221,7 +221,8 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, null);
- position.setNetwork(new Network(CellTower.fromLacCid(parser.nextHexInt(0), parser.nextHexInt(0))));
+ position.setNetwork(new Network(CellTower.fromLacCid(
+ getConfig(), parser.nextHexInt(0), parser.nextHexInt(0))));
} else {
diff --git a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
index 10a272bff..dcfb36fd1 100644
--- a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
@@ -19,7 +19,6 @@ import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -334,7 +333,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
if (parser.hasNext() && parser.next().equals("V1")) {
sendResponse(channel, remoteAddress, id, "V1");
- } else if (Context.getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
+ } else if (getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
sendResponse(channel, remoteAddress, id, "R12");
}
@@ -392,7 +391,8 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
position.setAltitude(parser.nextInt(0));
- position.setNetwork(new Network(CellTower.fromLacCid(parser.nextHexInt(0), parser.nextHexInt(0))));
+ position.setNetwork(new Network(CellTower.fromLacCid(
+ getConfig(), parser.nextHexInt(0), parser.nextHexInt(0))));
}
if (parser.hasNext()) {
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 9f54c8486..84120028a 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -585,7 +585,8 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_CHARGE, true);
}
- position.setNetwork(new Network(CellTower.fromCidLac(buf.readUnsignedInt(), buf.readUnsignedShort())));
+ position.setNetwork(new Network(CellTower.fromCidLac(
+ getConfig(), buf.readUnsignedInt(), buf.readUnsignedShort())));
int product = buf.readUnsignedByte();
int status = buf.readUnsignedShort();
diff --git a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
index b4b70091b..2c1b5dcec 100644
--- a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -177,7 +177,8 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY_LEVEL, battery);
}
- CellTower cellTower = CellTower.fromCidLac(buf.readUnsignedShort(), buf.readUnsignedShort());
+ CellTower cellTower = CellTower.fromCidLac(
+ getConfig(), buf.readUnsignedShort(), buf.readUnsignedShort());
cellTower.setSignalStrength((int) buf.readUnsignedByte());
position.setNetwork(new Network(cellTower));
@@ -201,7 +202,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
int rssi = buf.readUnsignedByte();
if (cid != 0 && lac != 0) {
- CellTower cellTower = CellTower.fromCidLac(cid, lac);
+ CellTower cellTower = CellTower.fromCidLac(getConfig(), cid, lac);
cellTower.setSignalStrength(rssi);
position.setNetwork(new Network(cellTower));
} else {
@@ -356,7 +357,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_BATTERY_LEVEL, parser.nextInt(0));
position.set(Position.KEY_STATUS, parser.nextBinInt(0));
- CellTower cellTower = CellTower.fromCidLac(parser.nextInt(0), parser.nextInt(0));
+ CellTower cellTower = CellTower.fromCidLac(getConfig(), parser.nextInt(0), parser.nextInt(0));
cellTower.setSignalStrength(parser.nextInt(0));
position.setNetwork(new Network(cellTower));
diff --git a/src/main/java/org/traccar/protocol/OrbcommProtocol.java b/src/main/java/org/traccar/protocol/OrbcommProtocol.java
index bdfce3b1e..2f9f56641 100644
--- a/src/main/java/org/traccar/protocol/OrbcommProtocol.java
+++ b/src/main/java/org/traccar/protocol/OrbcommProtocol.java
@@ -19,6 +19,7 @@ import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpRequestEncoder;
import io.netty.handler.codec.http.HttpResponseDecoder;
import org.traccar.BaseProtocol;
+import org.traccar.Context;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerClient;
@@ -32,7 +33,7 @@ public class OrbcommProtocol extends BaseProtocol {
pipeline.addLast(new HttpResponseDecoder());
pipeline.addLast(new HttpObjectAggregator(65535));
pipeline.addLast(new OrbcommProtocolDecoder(OrbcommProtocol.this));
- pipeline.addLast(new OrbcommProtocolPoller(OrbcommProtocol.this));
+ pipeline.addLast(new OrbcommProtocolPoller(OrbcommProtocol.this, Context.getConfig()));
}
});
}
diff --git a/src/main/java/org/traccar/protocol/OrbcommProtocolPoller.java b/src/main/java/org/traccar/protocol/OrbcommProtocolPoller.java
index 6a2d7a92d..0f57bfb49 100644
--- a/src/main/java/org/traccar/protocol/OrbcommProtocolPoller.java
+++ b/src/main/java/org/traccar/protocol/OrbcommProtocolPoller.java
@@ -24,8 +24,8 @@ import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.codec.http.QueryStringEncoder;
import org.traccar.BaseProtocolPoller;
-import org.traccar.Context;
import org.traccar.Protocol;
+import org.traccar.config.Config;
import org.traccar.config.Keys;
import java.net.SocketAddress;
@@ -46,11 +46,11 @@ public class OrbcommProtocolPoller extends BaseProtocolPoller {
this.startTime = startTime;
}
- public OrbcommProtocolPoller(Protocol protocol) {
- super(Context.getConfig().getLong(Keys.PROTOCOL_INTERVAL.withPrefix(protocol.getName())));
- accessId = Context.getConfig().getString(Keys.ORBCOMM_ACCESS_ID);
- password = Context.getConfig().getString(Keys.ORBCOMM_PASSWORD);
- host = Context.getConfig().getString(Keys.PROTOCOL_ADDRESS.withPrefix(protocol.getName()));
+ public OrbcommProtocolPoller(Protocol protocol, Config config) {
+ super(config.getLong(Keys.PROTOCOL_INTERVAL.withPrefix(protocol.getName())));
+ accessId = config.getString(Keys.ORBCOMM_ACCESS_ID);
+ password = config.getString(Keys.ORBCOMM_PASSWORD);
+ host = config.getString(Keys.PROTOCOL_ADDRESS.withPrefix(protocol.getName()));
}
@Override
diff --git a/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
index 8aae310bb..818acd805 100644
--- a/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -20,7 +20,6 @@ import io.netty.channel.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.Protocol;
import org.traccar.config.Keys;
@@ -35,11 +34,15 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
private static final Logger LOGGER = LoggerFactory.getLogger(SkypatrolProtocolDecoder.class);
- private final long defaultMask;
+ private long defaultMask;
public SkypatrolProtocolDecoder(Protocol protocol) {
super(protocol);
- defaultMask = Context.getConfig().getInteger(Keys.PROTOCOL_MASK.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ defaultMask = getConfig().getInteger(Keys.PROTOCOL_MASK.withPrefix(getProtocolName()));
}
private static double convertCoordinate(long coordinate) {
diff --git a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
index 7a6b6f4fe..5e631017e 100644
--- a/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/StarLinkProtocolDecoder.java
@@ -55,12 +55,15 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
public StarLinkProtocolDecoder(Protocol protocol) {
super(protocol);
+ }
- setFormat(Context.getConfig().getString(
+ @Override
+ protected void init() {
+ setFormat(getConfig().getString(
getProtocolName() + ".format", "#EDT#,#EID#,#PDT#,#LAT#,#LONG#,#SPD#,#HEAD#,#ODO#,"
+ "#IN1#,#IN2#,#IN3#,#IN4#,#OUT1#,#OUT2#,#OUT3#,#OUT4#,#LAC#,#CID#,#VIN#,#VBAT#,#DEST#,#IGN#,#ENG#"));
- setDateFormat(Context.getConfig().getString(getProtocolName() + ".dateFormat", "yyMMddHHmmss"));
+ setDateFormat(getConfig().getString(getProtocolName() + ".dateFormat", "yyMMddHHmmss"));
}
public String[] getFormat(long deviceId) {
@@ -313,7 +316,7 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
}
if (lac != null && cid != null) {
- position.setNetwork(new Network(CellTower.fromLacCid(lac, cid)));
+ position.setNetwork(new Network(CellTower.fromLacCid(getConfig(), lac, cid)));
}
if (event == 20) {
diff --git a/src/main/java/org/traccar/protocol/TechTltProtocolDecoder.java b/src/main/java/org/traccar/protocol/TechTltProtocolDecoder.java
index 17f5c80fa..b6091136a 100644
--- a/src/main/java/org/traccar/protocol/TechTltProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TechTltProtocolDecoder.java
@@ -110,7 +110,7 @@ public class TechTltProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_SATELLITES, parser.nextInt());
- position.setNetwork(new Network(CellTower.fromLacCid(parser.nextInt(), parser.nextInt())));
+ position.setNetwork(new Network(CellTower.fromLacCid(getConfig(), parser.nextInt(), parser.nextInt())));
return position;
}
diff --git a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 61a61b900..407488527 100644
--- a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -55,7 +55,11 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
public TeltonikaProtocolDecoder(Protocol protocol, boolean connectionless) {
super(protocol);
this.connectionless = connectionless;
- this.extended = Context.getConfig().getBoolean(Keys.PROTOCOL_EXTENDED.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ this.extended = getConfig().getBoolean(Keys.PROTOCOL_EXTENDED.withPrefix(getProtocolName()));
}
private void parseIdentification(Channel channel, SocketAddress remoteAddress, ByteBuf buf) {
@@ -360,7 +364,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
long cid = position.getLong(Position.PREFIX_IO + 205);
int lac = position.getInteger(Position.PREFIX_IO + 206);
if (cid != 0 && lac != 0) {
- CellTower cellTower = CellTower.fromLacCid(lac, cid);
+ CellTower cellTower = CellTower.fromLacCid(getConfig(), lac, cid);
long operator = position.getInteger(Position.KEY_OPERATOR);
if (operator >= 1000) {
cellTower.setOperator(operator);
@@ -422,7 +426,8 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(locationMask, 5)) {
- CellTower cellTower = CellTower.fromLacCid(buf.readUnsignedShort(), buf.readUnsignedShort());
+ CellTower cellTower = CellTower.fromLacCid(
+ getConfig(), buf.readUnsignedShort(), buf.readUnsignedShort());
if (BitUtil.check(locationMask, 6)) {
cellTower.setSignalStrength((int) buf.readUnsignedByte());
diff --git a/src/main/java/org/traccar/protocol/ThinkRaceProtocolDecoder.java b/src/main/java/org/traccar/protocol/ThinkRaceProtocolDecoder.java
index 0928b25e0..82033598d 100644
--- a/src/main/java/org/traccar/protocol/ThinkRaceProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/ThinkRaceProtocolDecoder.java
@@ -104,7 +104,7 @@ public class ThinkRaceProtocolDecoder extends BaseProtocolDecoder {
position.setCourse(buf.readUnsignedByte());
position.setNetwork(new Network(
- CellTower.fromLacCid(buf.readUnsignedShort(), buf.readUnsignedShort())));
+ CellTower.fromLacCid(getConfig(), buf.readUnsignedShort(), buf.readUnsignedShort())));
return position;
diff --git a/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
index ff33cb103..476d1d682 100644
--- a/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -17,7 +17,6 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -36,11 +35,15 @@ import java.util.regex.Pattern;
public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
- private final boolean decodeLow;
+ private boolean decodeLow;
public Tk103ProtocolDecoder(Protocol protocol) {
super(protocol);
- decodeLow = Context.getConfig().getBoolean(Keys.PROTOCOL_DECODE_LOW.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ decodeLow = getConfig().getBoolean(Keys.PROTOCOL_DECODE_LOW.withPrefix(getProtocolName()));
}
private static final Pattern PATTERN = new PatternBuilder()
diff --git a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
index 58c66031e..b76d5b307 100644
--- a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java
@@ -320,7 +320,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
int lac = parser.nextHexInt(0);
int cid = parser.nextHexInt(0);
if (lac != 0 && cid != 0) {
- position.setNetwork(new Network(CellTower.fromLacCid(lac, cid)));
+ position.setNetwork(new Network(CellTower.fromLacCid(getConfig(), lac, cid)));
}
position.set(Position.PREFIX_TEMP + 1, parser.next());
@@ -346,7 +346,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.PREFIX_TEMP + 2, parser.next());
position.setNetwork(new Network(
- CellTower.fromLacCid(parser.nextHexInt(0), parser.nextHexInt(0))));
+ CellTower.fromLacCid(getConfig(), parser.nextHexInt(0), parser.nextHexInt(0))));
position.setValid(parser.next().equals("A"));
position.set(Position.KEY_SATELLITES, parser.nextInt());
@@ -403,7 +403,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
int mcc = parser.nextInt();
cellTower = CellTower.from(mcc, mnc, lac, cid);
} else {
- cellTower = CellTower.fromLacCid(lac, cid);
+ cellTower = CellTower.fromLacCid(getConfig(), lac, cid);
}
position.set(Position.KEY_SATELLITES, parser.nextInt());
cellTower.setSignalStrength(parser.nextInt());
diff --git a/src/main/java/org/traccar/protocol/TzoneProtocolDecoder.java b/src/main/java/org/traccar/protocol/TzoneProtocolDecoder.java
index 819c42471..b1ddc5203 100644
--- a/src/main/java/org/traccar/protocol/TzoneProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TzoneProtocolDecoder.java
@@ -20,7 +20,6 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -284,7 +283,7 @@ public class TzoneProtocolDecoder extends BaseProtocolDecoder {
if (hardware == 0x10A || hardware == 0x10B || hardware == 0x406) {
position.setNetwork(new Network(
- CellTower.fromLacCid(buf.readUnsignedShort(), buf.readUnsignedShort())));
+ CellTower.fromLacCid(getConfig(), buf.readUnsignedShort(), buf.readUnsignedShort())));
} else if (hardware == 0x407) {
@@ -371,7 +370,7 @@ public class TzoneProtocolDecoder extends BaseProtocolDecoder {
}
- if (Context.getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
+ if (getConfig().getBoolean(Keys.PROTOCOL_ACK.withPrefix(getProtocolName()))) {
sendResponse(channel, remoteAddress, buf.getUnsignedShort(buf.writerIndex() - 6));
}
diff --git a/src/main/java/org/traccar/protocol/XirgoProtocolDecoder.java b/src/main/java/org/traccar/protocol/XirgoProtocolDecoder.java
index 630fe5aed..b53a42ac3 100644
--- a/src/main/java/org/traccar/protocol/XirgoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/XirgoProtocolDecoder.java
@@ -18,7 +18,6 @@ package org.traccar.protocol;
import io.netty.channel.Channel;
import io.netty.channel.socket.nio.NioDatagramChannel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -40,7 +39,11 @@ public class XirgoProtocolDecoder extends BaseProtocolDecoder {
public XirgoProtocolDecoder(Protocol protocol) {
super(protocol);
- form = Context.getConfig().getString(Keys.PROTOCOL_FORM.withPrefix(getProtocolName()));
+ }
+
+ @Override
+ protected void init() {
+ form = getConfig().getString(Keys.PROTOCOL_FORM.withPrefix(getProtocolName()));
}
public void setForm(String form) {
diff --git a/src/main/java/org/traccar/protocol/Xt2400ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Xt2400ProtocolDecoder.java
index 85e8e140f..b3f6493a8 100644
--- a/src/main/java/org/traccar/protocol/Xt2400ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Xt2400ProtocolDecoder.java
@@ -18,7 +18,6 @@ package org.traccar.protocol;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
import org.traccar.DeviceSession;
import org.traccar.Protocol;
import org.traccar.config.Keys;
@@ -38,8 +37,11 @@ public class Xt2400ProtocolDecoder extends BaseProtocolDecoder {
public Xt2400ProtocolDecoder(Protocol protocol) {
super(protocol);
+ }
- String config = Context.getConfig().getString(Keys.PROTOCOL_CONFIG.withPrefix(getProtocolName()));
+ @Override
+ protected void init() {
+ String config = getConfig().getString(Keys.PROTOCOL_CONFIG.withPrefix(getProtocolName()));
if (config != null) {
setConfig(config);
}
diff --git a/src/test/java/org/traccar/BaseTest.java b/src/test/java/org/traccar/BaseTest.java
index 1dddbb03b..35374a363 100644
--- a/src/test/java/org/traccar/BaseTest.java
+++ b/src/test/java/org/traccar/BaseTest.java
@@ -1,9 +1,39 @@
package org.traccar;
+import org.traccar.config.Config;
+import org.traccar.database.ConnectionManager;
+import org.traccar.database.IdentityManager;
+import org.traccar.database.MediaManager;
+import org.traccar.database.StatisticsManager;
+import org.traccar.model.Device;
+
+import static org.mockito.Mockito.*;
+
public class BaseTest {
static {
Context.init(new TestIdentityManager());
}
+ protected <T extends BaseProtocolDecoder> T inject(T decoder) throws Exception {
+ decoder.setConfig(new Config());
+ var device = mock(Device.class);
+ when(device.getId()).thenReturn(1L);
+ var identityManager = mock(IdentityManager.class);
+ when(identityManager.getByUniqueId(any())).thenReturn(device);
+ decoder.setIdentityManager(identityManager);
+ decoder.setConnectionManager(mock(ConnectionManager.class));
+ decoder.setStatisticsManager(mock(StatisticsManager.class));
+ decoder.setMediaManager(mock(MediaManager.class));
+ return decoder;
+ }
+
+ protected <T extends BaseFrameDecoder> T inject(T decoder) throws Exception {
+ return decoder;
+ }
+
+ protected <T extends BaseProtocolEncoder> T inject(T encoder) throws Exception {
+ return encoder;
+ }
+
}
diff --git a/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java b/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java
index 1682ca56d..02d42447e 100644
--- a/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AdmFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class AdmFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AdmFrameDecoder();
+ var decoder = inject(new AdmFrameDecoder());
verifyFrame(
binary("38363931353330343235323337383400003728e000001402441d5f42c3711642930d000000c7000a461954f25fd82ed508000000000000000044000000010000000000140000"),
diff --git a/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java
index 7c8769925..810d53bf7 100644
--- a/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AdmProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AdmProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AdmProtocolDecoder(null);
+ var decoder = inject(new AdmProtocolDecoder(null));
verifyPosition(decoder, binary(
"38363931353330343235323337383400003728e000001402441d5f42c3711642930d000000c7000a461954f25fd82ed508000000000000000044000000010000000000140000"));
diff --git a/src/test/java/org/traccar/protocol/AisProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AisProtocolDecoderTest.java
index f869ab8f3..36ea3d361 100644
--- a/src/test/java/org/traccar/protocol/AisProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AisProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AisProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AisProtocolDecoder(null);
+ var decoder = inject(new AisProtocolDecoder(null));
verifyPositions(decoder, text(
"!AIVDM,2,1,8,A,53UlSb01l>Ei=H4KF218PTpv222222222222221?8h=766gB0<Ck11DTp888,0*14s:MTb827ebc7686b,c:1481688227737*4d\\\r\n" +
diff --git a/src/test/java/org/traccar/protocol/AlematicsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AlematicsProtocolDecoderTest.java
index 8bd457a97..585e02c02 100644
--- a/src/test/java/org/traccar/protocol/AlematicsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AlematicsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AlematicsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AlematicsProtocolDecoder(null);
+ var decoder = inject(new AlematicsProtocolDecoder(null));
verifyPosition(decoder, text(
"$T,2,64,866050035975497,20180726103446,20180726103514,23.033305,72.558032,0,0,41,5.4,4,0,0,0.000,12.960,0,"));
diff --git a/src/test/java/org/traccar/protocol/AnytrekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AnytrekProtocolDecoderTest.java
index b6f95513c..5e0923e9c 100644
--- a/src/test/java/org/traccar/protocol/AnytrekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AnytrekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AnytrekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AnytrekProtocolDecoder(null);
+ var decoder = inject(new AnytrekProtocolDecoder(null));
verifyPosition(decoder, binary(
"78783500300086428703204121160085015111050C0A0D20C6FD24A102FF8EAC0C01001404000000FFFFFFFF131702210000000000000000000D0A"));
diff --git a/src/test/java/org/traccar/protocol/ApelProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ApelProtocolDecoderTest.java
index b922d3ef1..369c13115 100644
--- a/src/test/java/org/traccar/protocol/ApelProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ApelProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ApelProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ApelProtocolDecoder(null);
+ var decoder = inject(new ApelProtocolDecoder(null));
/*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};
verifyNull(decoder, text( ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, buf1)));*/
diff --git a/src/test/java/org/traccar/protocol/AplicomFrameDecoderTest.java b/src/test/java/org/traccar/protocol/AplicomFrameDecoderTest.java
index 96a219d2a..b055221f2 100644
--- a/src/test/java/org/traccar/protocol/AplicomFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AplicomFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class AplicomFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AplicomFrameDecoder();
+ var decoder = inject(new AplicomFrameDecoder());
assertEquals(
binary("44C20146B710C158DA009500B09F7700C054CA0EA454CA0EA403BE0BF6015D706B070000142A600000000000000002434946010801000754CA0EA4000000000000008400000000000000000000000000000000300000FE00FE0000000000000000000000000000000000000000000000000000000000000000000040502035000000000000020D0000030D0000040C0000040D0000050C0000050D0000058C0000060C"),
diff --git a/src/test/java/org/traccar/protocol/AplicomProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AplicomProtocolDecoderTest.java
index 5abe9550d..4b25830f8 100644
--- a/src/test/java/org/traccar/protocol/AplicomProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AplicomProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AplicomProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AplicomProtocolDecoder(null);
+ var decoder = inject(new AplicomProtocolDecoder(null));
verifyNull(decoder, binary(
"434946010A0100075253F85F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FEEA0000FEE90000F0030000F0040000FEF10000FEF20000FEF50000FEFC0000FEC10000FEE500"));
diff --git a/src/test/java/org/traccar/protocol/AppelloProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AppelloProtocolDecoderTest.java
index da4d82938..e821c9dba 100644
--- a/src/test/java/org/traccar/protocol/AppelloProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AppelloProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AppelloProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AppelloProtocolDecoder(null);
+ var decoder = inject(new AppelloProtocolDecoder(null));
verifyAttributes(decoder, text(
"FOLLOWIT,867273024233699,UTCTIME,0.000000,0.000000,0,0,0,0,L,262:3:c703:4bf8:64:255|262:3:c703:9a18:45|262:3:c703:e838:33|262:3:c703:7190:20|262:3:c704:d896:17|,02,44,,31,,4.20,0,0,86/44/24,,,,26,02264DFF6E16:69|4C09D408554E:79|4C09D408554F:79|E0885DE705E5:81|E2885DE705E7:81|246511122CCC:83|,34925"));
diff --git a/src/test/java/org/traccar/protocol/AquilaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AquilaProtocolDecoderTest.java
index 57d793c71..38c5d3b6d 100644
--- a/src/test/java/org/traccar/protocol/AquilaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AquilaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AquilaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeA() throws Exception {
- var decoder = new AquilaProtocolDecoder(null);
+ var decoder = inject(new AquilaProtocolDecoder(null));
verifyPosition(decoder, text(
"$$CLIENT_1ZF,170215089,20,18.462809,73.824188,170613182744,A,01,123456,*37"));
diff --git a/src/test/java/org/traccar/protocol/Ardi01ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
index 653e4346d..fd65ce585 100644
--- a/src/test/java/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Ardi01ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Ardi01ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Ardi01ProtocolDecoder(null);
+ var decoder = inject(new Ardi01ProtocolDecoder(null));
verifyPosition(decoder, text(
"013227003054776,20141010052719,24.4736042,56.8445807,110,289,40,7,5,78,-1"),
diff --git a/src/test/java/org/traccar/protocol/ArknavProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArknavProtocolDecoderTest.java
index b95963f40..b07dff150 100644
--- a/src/test/java/org/traccar/protocol/ArknavProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArknavProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ArknavProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ArknavProtocolDecoder(null);
+ var decoder = inject(new ArknavProtocolDecoder(null));
verifyPosition(decoder, text(
"358266016278447,05*827,000,L001,V,4821.6584,N,01053.8650,E,000.0,000.0,00.0,08:46:04 17-03-16,9.5A,D7,0,79,0,,,,"),
diff --git a/src/test/java/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
index c2d78dca6..9686c694b 100644
--- a/src/test/java/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArknavX8ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ArknavX8ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ArknavX8ProtocolDecoder(null);
+ var decoder = inject(new ArknavX8ProtocolDecoder(null));
verifyNull(decoder, text(
"351856045213782,241111"));
diff --git a/src/test/java/org/traccar/protocol/ArmoliProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArmoliProtocolDecoderTest.java
index da2542b34..515f7f7b2 100644
--- a/src/test/java/org/traccar/protocol/ArmoliProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArmoliProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class ArmoliProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ArmoliProtocolDecoder(null);
+ var decoder = inject(new ArmoliProtocolDecoder(null));
verifyAttribute(decoder, text(
"[M869867039550712160821153237N41.033508E029.2697032F00036000000410006B336FFFFG458563@A6D>04410C2482>03410F56>03412F19>0441210000>034130FF>0441313A7>03410D30>04411F01B6>0341048C>04410C1C98];"),
diff --git a/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
index f2940de59..f96da5203 100644
--- a/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArnaviBinaryProtocolDecoderTest.java
@@ -8,9 +8,7 @@ public class ArnaviBinaryProtocolDecoderTest extends ProtocolTest {
@Test
public void testHeader1Decode() throws Exception {
- ArnaviBinaryProtocolDecoder decoder;
-
- decoder = new ArnaviBinaryProtocolDecoder(null);
+ var decoder = inject(new ArnaviBinaryProtocolDecoder(null));
verifyNull(decoder, binary(
"ff22f30c45f5c90f0300"));
@@ -23,9 +21,7 @@ public class ArnaviBinaryProtocolDecoderTest extends ProtocolTest {
@Test
public void testHeader2Decode() throws Exception {
- ArnaviBinaryProtocolDecoder decoder;
-
- decoder = new ArnaviBinaryProtocolDecoder(null);
+ var decoder = inject(new ArnaviBinaryProtocolDecoder(null));
verifyNull(decoder, binary(
"ff23f30c45f5c90f0300"));
diff --git a/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
index 3f495731a..92ca5d2b0 100644
--- a/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArnaviFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class ArnaviFrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeValidPackets() throws Exception {
- var decoder = new ArnaviFrameDecoder();
+ var decoder = inject(new ArnaviFrameDecoder());
verifyFrame(
binary("2441562c563344492c38353136342c3231342c2d312c31392c30303030344634462c30303030303935452c30433030303030322c3836333037313031333034313631382c38393939373031353630333832353236363232462c2a3039"),
diff --git a/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java
index 9e9047be4..e27367119 100644
--- a/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ArnaviTextProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ArnaviTextProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ArnaviTextProtocolDecoder(null);
+ var decoder = inject(new ArnaviTextProtocolDecoder(null));
verifyPosition(decoder, buffer(
"$AV,V4,999999,12487,2277,203,65534,0,0,193,65535,65535,65535,65535,1,13,80.0,56.1,200741,5950.6773N,03029.1043E,300.0,360.0,121012,65535,65535,65535,SF*6E"));
diff --git a/src/test/java/org/traccar/protocol/AstraProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AstraProtocolDecoderTest.java
index 3376fa3f0..2d8798dff 100644
--- a/src/test/java/org/traccar/protocol/AstraProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AstraProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AstraProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AstraProtocolDecoder(null);
+ var decoder = inject(new AstraProtocolDecoder(null));
verifyPositions(decoder, binary(
"4b00700529c0c265976b8202cba9ff00676d864554a9c30000000020073401006436000300030008000000000000a0000100001920c43d00009600428302cba9ff00676d864554aa3e000000002007240100643b000300020008000000000000b0000100001920c43d00009600420f0e"));
diff --git a/src/test/java/org/traccar/protocol/At2000FrameDecoderTest.java b/src/test/java/org/traccar/protocol/At2000FrameDecoderTest.java
index 0782c2d34..773a8f7f5 100644
--- a/src/test/java/org/traccar/protocol/At2000FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/At2000FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class At2000FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new At2000FrameDecoder();
+ var decoder = inject(new At2000FrameDecoder());
verifyFrame(
binary("01012f00000000000000000000000000003335363137333036343430373439320fad981997ae8e031fe10c0ea7641903ca32c0331df467233d2a9cd886fbeef8"),
diff --git a/src/test/java/org/traccar/protocol/AtrackFrameDecoderTest.java b/src/test/java/org/traccar/protocol/AtrackFrameDecoderTest.java
index 77e90ca53..958814e53 100644
--- a/src/test/java/org/traccar/protocol/AtrackFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AtrackFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class AtrackFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AtrackFrameDecoder();
+ var decoder = inject(new AtrackFrameDecoder());
verifyFrame(
binary("4052698c032a924f000147027fe5d7425f642e56060f031847bb68cb500719e26752c25bebc11c7fddce2b8ed4eff4ed863b187cc6653b5b1c1fc6803884d21aeeedae2ec6e72781d97e95b965610c1d107e5400cd5a7b7b3b592e676091c6a5893d80af9b3c63ae4de20d6e5bc60440bf2c299fbabfe268039d558e4b8589dd5173c926b7f51b916ba29f21d46ff9170793fe450072d691896e114fddce4fd29f7f2f9b74e41ca83814015e8a00ffd1f9bd475e2a44624e074a009455ab5628e39fce8036a09368cf1d2ba0d2653b979c0a00e9edc82335a56d1ee6071401d468b0f4cd761a743d011401d15b4636015721870dd0500695b2edabeabf2f4a00a514645cc83a739ad165f320c1ed401617a0a2800a2803ffd2faa68a004660aa598e00acd8f4d866d54eab3c7994284881fe11ebf5e68034e8a0086e674850927f0ae2bc4dafa5844659674451d39e49a00e1dae23d76ed67bb72211d109e4d5bd756da3b68a4b755021e30076a00cf31431a064e41e6a19a68d5396518f7a00f1ff008bfe27f31068766dbb7e1a723d3fbbf8d79aeb764748b489662be7ccbbb6820e07d4500734caa727765aa32ac0720e28026b4bb9ed7ccf2594798bb5b2a0f1f8f4a82800a2803fffd3f9b97352ae02e45004c808e4f7a997823bd005e86600618f26b7b4a9cab819fa500767a749b9403cd74162b903de803acd1e3c28aebf4d4c81401d05a4441fad682444738a00b712f2055f03e502802b14c5dffbc2ac106343ed4012a905411e94b40051401fffd4faa6992488980c793d0773400d54676df2f1e8b9e054b400564ebb77750c463b442d2119247f08f53e9401e7da85d6a12cd221d427217a856c60fe15caea9689292f2832bfac8777f3a00e67538ef150ff00665d9b4b95fba4aee46f623fa8ae26fbe24f88b49b87d3b5bd2a12e38ca3950e3d41e7228008be2ac02d423dadc09071c1047e791fcab96d77c79acdf92969279113f1c1cb7e7401876c4c939b8ba73230e5998e49ac4d66ee6bebd796462ddb9f4ed40140a12339e9dea225b1824d0025140051401fffd5f9bc676f6a7ae4af6e280255cf5c7153a7b0a0052d8715bba64bf32f39a00ed74694902bb1d306e65c500763a5afca2baed2"),
diff --git a/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 4a66dbf58..b6b09fc25 100644
--- a/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AtrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AtrackProtocolDecoder(null);
+ var decoder = inject(new AtrackProtocolDecoder(null));
verifyNull(decoder, binary(
"4052698c032a924f000147027fe5d7425f642e56060f031847bb68cb500719e26752c25bebc11c7fddce2b8ed4eff4ed863b187cc6653b5b1c1fc6803884d21aeeedae2ec6e72781d97e95b965610c1d107e5400cd5a7b7b3b592e676091c6a5893d80af9b3c63ae4de20d6e5bc60440bf2c299fbabfe268039d558e4b8589dd5173c926b7f51b916ba29f21d46ff9170793fe450072d691896e114fddce4fd29f7f2f9b74e41ca83814015e8a00ffd1f9bd475e2a44624e074a009455ab5628e39fce8036a09368cf1d2ba0d2653b979c0a00e9edc82335a56d1ee6071401d468b0f4cd761a743d011401d15b4636015721870dd0500695b2edabeabf2f4a00a514645cc83a739ad165f320c1ed401617a0a2800a2803ffd2faa68a004660aa598e00acd8f4d866d54eab3c7994284881fe11ebf5e68034e8a0086e674850927f0ae2bc4dafa5844659674451d39e49a00e1dae23d76ed67bb72211d109e4d5bd756da3b68a4b755021e30076a00cf31431a064e41e6a19a68d5396518f7a00f1ff008bfe27f31068766dbb7e1a723d3fbbf8d79aeb764748b489662be7ccbbb6820e07d4500734caa727765aa32ac0720e28026b4bb9ed7ccf2594798bb5b2a0f1f8f4a82800a2803fffd3f9b97352ae02e45004c808e4f7a997823bd005e86600618f26b7b4a9cab819fa500767a749b9403cd74162b903de803acd1e3c28aebf4d4c81401d05a4441fad682444738a00b712f2055f03e502802b14c5dffbc2ac106343ed4012a905411e94b40051401fffd4faa6992488980c793d0773400d54676df2f1e8b9e054b400564ebb77750c463b442d2119247f08f53e9401e7da85d6a12cd221d427217a856c60fe15caea9689292f2832bfac8777f3a00e67538ef150ff00665d9b4b95fba4aee46f623fa8ae26fbe24f88b49b87d3b5bd2a12e38ca3950e3d41e7228008be2ac02d423dadc09071c1047e791fcab96d77c79acdf92969279113f1c1cb7e7401876c4c939b8ba73230e5998e49ac4d66ee6bebd796462ddb9f4ed40140a12339e9dea225b1824d0025140051401fffd5f9bc676f6a7ae4af6e280255cf5c7153a7b0a0052d8715bba64bf32f39a00ed74694902bb1d306e65c500763a5afca2baed2"));
@@ -111,7 +111,7 @@ public class AtrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeCustom() throws Exception {
- var decoder = new AtrackProtocolDecoder(null);
+ var decoder = inject(new AtrackProtocolDecoder(null));
decoder.setCustom(true);
diff --git a/src/test/java/org/traccar/protocol/AuroProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AuroProtocolDecoderTest.java
index fbe3ad0a3..368f7ed4c 100644
--- a/src/test/java/org/traccar/protocol/AuroProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AuroProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AuroProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AuroProtocolDecoder(null);
+ var decoder = inject(new AuroProtocolDecoder(null));
verifyPosition(decoder, text(
"M0028T0000816398975I357325031465123E00001W*****110620150437000068DA#RD01DA240000000001+100408425+013756121100620152137231112240330004400"));
diff --git a/src/test/java/org/traccar/protocol/AustinNbProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AustinNbProtocolDecoderTest.java
index 0be22b333..30152e94c 100644
--- a/src/test/java/org/traccar/protocol/AustinNbProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AustinNbProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AustinNbProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AustinNbProtocolDecoder(null);
+ var decoder = inject(new AustinNbProtocolDecoder(null));
verifyPosition(decoder, text(
"48666666666;2017-01-01 16:31:01;52,1133308410645;21,1000003814697;310;120;2292;1;ORANGE"));
diff --git a/src/test/java/org/traccar/protocol/AutoFonProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AutoFonProtocolDecoderTest.java
index 3e64defdb..8e17d5673 100644
--- a/src/test/java/org/traccar/protocol/AutoFonProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AutoFonProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class AutoFonProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AutoFonProtocolDecoder(null);
+ var decoder = inject(new AutoFonProtocolDecoder(null));
verifyNull(decoder, binary(
"10556103592310314825728F"));
diff --git a/src/test/java/org/traccar/protocol/AutoGradeProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AutoGradeProtocolDecoderTest.java
index 697ac8a06..7f837451c 100644
--- a/src/test/java/org/traccar/protocol/AutoGradeProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AutoGradeProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AutoGradeProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AutoGradeProtocolDecoder(null);
+ var decoder = inject(new AutoGradeProtocolDecoder(null));
verifyPosition(decoder, text(
"(000000001637868324027912356171116A2250.7611N07556.9425E000.9024427197.36\u008eA0000B0000C0000D0000E0000K0000L0000M0000N0000O0000)"));
diff --git a/src/test/java/org/traccar/protocol/AutoTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AutoTrackProtocolDecoderTest.java
index 64a7459ce..51bbd0d8c 100644
--- a/src/test/java/org/traccar/protocol/AutoTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AutoTrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class AutoTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AutoTrackProtocolDecoder(null);
+ var decoder = inject(new AutoTrackProtocolDecoder(null));
verifyNull(decoder, binary(
"f1f1f1f1330c00201007090006de7200000000daa3"));
diff --git a/src/test/java/org/traccar/protocol/AvemaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AvemaProtocolDecoderTest.java
index 6138711aa..7f41d6b47 100644
--- a/src/test/java/org/traccar/protocol/AvemaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AvemaProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class AvemaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new AvemaProtocolDecoder(null);
+ var decoder = inject(new AvemaProtocolDecoder(null));
verifyAttribute(decoder, text(
"1000000000,20190527072358,121.646024,25.062135,0,0,0,0,10,0.0,1,0.02,12.32,0,0,15,2,466-5,10275,0,0.01,65EB812A000104E0,8000001234,NormanChang"),
diff --git a/src/test/java/org/traccar/protocol/Avl301ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Avl301ProtocolDecoderTest.java
index fb1984d87..1da432cea 100644
--- a/src/test/java/org/traccar/protocol/Avl301ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Avl301ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Avl301ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Avl301ProtocolDecoder(null);
+ var decoder = inject(new Avl301ProtocolDecoder(null));
verifyNull(decoder, binary(
"244c0f086058500087335500010d0a"));
diff --git a/src/test/java/org/traccar/protocol/B2316ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/B2316ProtocolDecoderTest.java
index 6b9c71b0e..ea3b38e7d 100644
--- a/src/test/java/org/traccar/protocol/B2316ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/B2316ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class B2316ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new B2316ProtocolDecoder(null);
+ var decoder = inject(new B2316ProtocolDecoder(null));
verifyPositions(decoder, false, text(
"{\"imei\":\"866349041783600\",\"data\":[{\"tm\":1631162952,\"wn\":7},{\"tm\":1631158729,\"ic\":\"89883030000059398609\",\"ve\":\"B2316.TAU.U.TH01\"},{\"tm\":1631158805,\"te\":\"312,363\",\"st\":0,\"ba\":3,\"sn\":80},{\"tm\":1631158829,\"ci\":\"505,1,8218,133179149,-108\"},{\"tm\":1631162956,\"wi\":\"101331c17f4f,-74;f46bef7953bb,-81;b09575cff1c8,-86;e2b9e5d61a7a,-88;b0ee7b4dee2f,-88;e0b9e5d61a77,-89;f66bef7953b9,-89;\",\"te\":\"335,366\",\"hr\":58,\"bp\":\"113,73\",\"st\":0,\"ba\":3,\"sn\":60},{\"tm\":1631162968,\"ci\":\"505,1,8218,133179149,-105\"}]}"));
diff --git a/src/test/java/org/traccar/protocol/BceProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/BceProtocolDecoderTest.java
index 544d49967..4117833c0 100644
--- a/src/test/java/org/traccar/protocol/BceProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/BceProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class BceProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new BceProtocolDecoder(null);
+ var decoder = inject(new BceProtocolDecoder(null));
verifyNull(decoder, binary(
"3ab90b71bc1503000300c10bff11"));
diff --git a/src/test/java/org/traccar/protocol/BlackKiteProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/BlackKiteProtocolDecoderTest.java
index 3fdac8479..2fb93f2a9 100644
--- a/src/test/java/org/traccar/protocol/BlackKiteProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/BlackKiteProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class BlackKiteProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new BlackKiteProtocolDecoder(null);
+ var decoder = inject(new BlackKiteProtocolDecoder(null));
verifyNull(decoder, binary(
"01150003313131313131313131313131313131209836055605BA"));
diff --git a/src/test/java/org/traccar/protocol/BlueProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/BlueProtocolDecoderTest.java
index 4e74adf38..1de542e24 100644
--- a/src/test/java/org/traccar/protocol/BlueProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/BlueProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class BlueProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new BlueProtocolDecoder(null);
+ var decoder = inject(new BlueProtocolDecoder(null));
verifyAttribute(decoder, binary(
"AA0056860080E3E79E0C811F80000114020207170520011F00407F8005EE1938113B270000000000000000140202071705005AC7A621121F0002000100B7000080110000000000001A3A0000000001F400000000000078"),
diff --git a/src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java
index 5b639e12b..0a19eb3b0 100644
--- a/src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class BoxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new BoxProtocolDecoder(null);
+ var decoder = inject(new BoxProtocolDecoder(null));
verifyNull(decoder, text(
"H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2"));
diff --git a/src/test/java/org/traccar/protocol/C2stekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/C2stekProtocolDecoderTest.java
index 6fb14b902..fbb530e7f 100644
--- a/src/test/java/org/traccar/protocol/C2stekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/C2stekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class C2stekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new C2stekProtocolDecoder(null);
+ var decoder = inject(new C2stekProtocolDecoder(null));
verifyPosition(decoder, text(
"PA$867965024889327$D#220222#135059#0#+37.98995#+23.85141#0.00#69.2#0.0#0000#000#8#00#sz-w1001#B2600$AP"));
diff --git a/src/test/java/org/traccar/protocol/CalAmpProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CalAmpProtocolDecoderTest.java
index 79d27e2ab..1a8431f23 100644
--- a/src/test/java/org/traccar/protocol/CalAmpProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CalAmpProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CalAmpProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CalAmpProtocolDecoder(null);
+ var decoder = inject(new CalAmpProtocolDecoder(null));
verifyPosition(decoder, binary(
"830547643586340101010400105f9c39ba5f9c302eeb36d5bddf39df700000000000000000003400040321ff9f4f0087080200001c30783330304544383946333335303139303030303030343637450d0a"));
diff --git a/src/test/java/org/traccar/protocol/CarTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CarTrackProtocolDecoderTest.java
index dd96c2585..d12d4aa9f 100644
--- a/src/test/java/org/traccar/protocol/CarTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CarTrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CarTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CarTrackProtocolDecoder(null);
+ var decoder = inject(new CarTrackProtocolDecoder(null));
verifyNull(decoder, text(
"$$020040????????&A0000"));
diff --git a/src/test/java/org/traccar/protocol/CarscopProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CarscopProtocolDecoderTest.java
index b1fe69bac..71137cacf 100644
--- a/src/test/java/org/traccar/protocol/CarscopProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CarscopProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CarscopProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CarscopProtocolDecoder(null);
+ var decoder = inject(new CarscopProtocolDecoder(null));
verifyNull(decoder, text(
"*170821223045UB00HSO"));
diff --git a/src/test/java/org/traccar/protocol/CastelProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CastelProtocolDecoderTest.java
index f90fbe5ba..1add623b7 100644
--- a/src/test/java/org/traccar/protocol/CastelProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CastelProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CastelProtocolDecoder(null);
+ var decoder = inject(new CastelProtocolDecoder(null));
verifyAttribute(decoder, binary(
"40403a00043231334744503230313830323133343300000000a002000001000001012011004d414c43333831434d4b4d353637313438c8fc0d0a"),
diff --git a/src/test/java/org/traccar/protocol/CautelaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CautelaProtocolDecoderTest.java
index fe8586068..4022d688b 100644
--- a/src/test/java/org/traccar/protocol/CautelaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CautelaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CautelaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CautelaProtocolDecoder(null);
+ var decoder = inject(new CautelaProtocolDecoder(null));
verifyPosition(decoder, text(
"20,010907000000,14,02,18,16.816667,96.166667,1325,S,*2E"));
diff --git a/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java b/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java
index 04a0f74d5..c266dd1f4 100644
--- a/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CellocatorFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class CellocatorFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CellocatorFrameDecoder();
+ var decoder = inject(new CellocatorFrameDecoder());
verifyFrame(
binary("4D4347500BA9880B00C80A7E003800000000000806000001210A14000613000000000D4457A5F71442AC02E80300000100040707000011171408060E1C08000100000200020000FD"),
diff --git a/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
index 3ae5350f2..7e96b073b 100644
--- a/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CellocatorProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CellocatorProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CellocatorProtocolDecoder(null);
+ var decoder = inject(new CellocatorProtocolDecoder(null));
verifyPosition(decoder, binary(
"4D43475000856308000004B2DE1F04009E00200100000000696CF7AB002F1A00000000000000325C000402069BFDE70857E22502F41C000036000000DF0B0932100B09DC0719"));
diff --git a/src/test/java/org/traccar/protocol/CguardProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CguardProtocolDecoderTest.java
index a7ed0e754..835ab5fe5 100644
--- a/src/test/java/org/traccar/protocol/CguardProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CguardProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CguardProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CguardProtocolDecoder(null);
+ var decoder = inject(new CguardProtocolDecoder(null));
verifyNull(decoder, text(
"IDRO:354868050655283"));
diff --git a/src/test/java/org/traccar/protocol/CityeasyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CityeasyProtocolDecoderTest.java
index 07d6368ab..0c1fc1f5d 100644
--- a/src/test/java/org/traccar/protocol/CityeasyProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CityeasyProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class CityeasyProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CityeasyProtocolDecoder(null);
+ var decoder = inject(new CityeasyProtocolDecoder(null));
verifyNotNull(decoder, binary(
"545400853575570249020100033b3430342c34352c31303638312c31313632312c33352c31303638312c31313632322c32332c31303638312c32383938332c32332c31303638312c31313632332c32312c31303638312c32333338312c31372c31303638312c32323538332c31372c31303638312c32363434312c31330000000d352e0d0a"));
diff --git a/src/test/java/org/traccar/protocol/ContinentalProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ContinentalProtocolDecoderTest.java
index 2924d2c4d..6ac2ae01d 100644
--- a/src/test/java/org/traccar/protocol/ContinentalProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ContinentalProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ContinentalProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ContinentalProtocolDecoder(null);
+ var decoder = inject(new ContinentalProtocolDecoder(null));
verifyPosition(decoder, binary(
"5356003216001eb48505025b4001e90f7f18ce0f00522200400001015b4001e9000e820100000c24000100014e0400736a7a"),
diff --git a/src/test/java/org/traccar/protocol/CradlepointProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/CradlepointProtocolDecoderTest.java
index 1e3023b39..f95bfb54d 100644
--- a/src/test/java/org/traccar/protocol/CradlepointProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/CradlepointProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class CradlepointProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new CradlepointProtocolDecoder(null);
+ var decoder = inject(new CradlepointProtocolDecoder(null));
verifyPosition(decoder, text(
"356526070063940,0,4337.19009,N,11612.34705,W,0.0,277.2,AT&T,,,-79,,-14.0,"));
diff --git a/src/test/java/org/traccar/protocol/DingtekFrameDecoderTest.java b/src/test/java/org/traccar/protocol/DingtekFrameDecoderTest.java
index 6236410b3..c63775858 100644
--- a/src/test/java/org/traccar/protocol/DingtekFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DingtekFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class DingtekFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DingtekFrameDecoder();
+ var decoder = inject(new DingtekFrameDecoder());
verifyFrame(
binary("383030303031303131453032383830303138303030303030303030313545303038303545433430303031313836383832323034303130343433303831"),
diff --git a/src/test/java/org/traccar/protocol/DingtekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DingtekProtocolDecoderTest.java
index 8b3d07c22..7e5f68e05 100644
--- a/src/test/java/org/traccar/protocol/DingtekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DingtekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DingtekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DingtekProtocolDecoder(null);
+ var decoder = inject(new DingtekProtocolDecoder(null));
verifyPosition(decoder, text(
"800001011e0692001a00000000016e008027c40000186962703655111781"));
diff --git a/src/test/java/org/traccar/protocol/DishaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DishaProtocolDecoderTest.java
index 4492b3ed0..3faccd7ea 100644
--- a/src/test/java/org/traccar/protocol/DishaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DishaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DishaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DishaProtocolDecoder(null);
+ var decoder = inject(new DishaProtocolDecoder(null));
verifyPosition(decoder, text(
"$A#A#864161028848856#A#053523#010216#2232.7733#N#08821.1940#E#002.75#038.1#09#00.8#1800#0#000#0000#9999#11.7#285.7#0001*"));
diff --git a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
index 31d0efa12..99760546f 100644
--- a/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DmtHttpProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class DmtHttpProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DmtHttpProtocolDecoder(null);
+ var decoder = inject(new DmtHttpProtocolDecoder(null));
verifyAttributes(decoder, request(HttpMethod.POST, "/",
buffer("{\"date\":\"2021-12-12T16:04:52Z\",\"device\":{\"sn\":\"416581\",\"prod\":85,\"rev\":1,\"fw\":\"1.12\",\"iccid\":\"89011702278612797427\",\"imei\":\"351358810439486\"},\"sqn\":1549,\"reason\":42,\"counters\":[{\"id\":0,\"val\":5304},{\"id\":3,\"val\":3200},{\"id\":4,\"val\":5066},{\"id\":128,\"val\":1},{\"id\":129,\"val\":8},{\"id\":130,\"val\":0},{\"id\":131,\"val\":0},{\"id\":132,\"val\":0},{\"id\":134,\"val\":1},{\"id\":138,\"val\":0},{\"id\":139,\"val\":36},{\"id\":142,\"val\":1629023},{\"id\":145,\"val\":0},{\"id\":146,\"val\":1}]}")));
diff --git a/src/test/java/org/traccar/protocol/DmtProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DmtProtocolDecoderTest.java
index 82a4cd5ff..9c14a1ebe 100644
--- a/src/test/java/org/traccar/protocol/DmtProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DmtProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DmtProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DmtProtocolDecoder(null);
+ var decoder = inject(new DmtProtocolDecoder(null));
verifyNull(decoder, binary(
"0255003300001b00003335333232393032373533393235310038393931353030303030303030313330343539340000000403041910780603"));
diff --git a/src/test/java/org/traccar/protocol/DolphinProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DolphinProtocolDecoderTest.java
index 0215973e8..b9e3da67d 100644
--- a/src/test/java/org/traccar/protocol/DolphinProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DolphinProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DolphinProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DolphinProtocolDecoder(null);
+ var decoder = inject(new DolphinProtocolDecoder(null));
verifyPositions(decoder, binary(
"ababff8f0300000100000100e03c0b86c70e03005c0f0000ab4cd12d0aa9010d0d7f0e4215f6fe6c421d00b0ce4420122daa9a9042359a99f9413806455e53fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa0662404801010ce41bb8f4cc2ad801fe98f3030893dd9a010001019299f303155400000007b401000000000072ac01b99401f8de8a0adc03900e0049000003004bfa010aa7010d4f7f0e421505ff6c421dcd1cce4420112d3ef984423552b89e413806456053fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e4201010ce41bd8f4cc2a20ff98f3030193dd9a010001019399f30315420000000000000000000072ad018f950181df8a0aee03cd0d004b000003004bfa010aa7010da67f0e42154fff6c421d3393cd4420112d073c9942358fc2df413806456253fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e4c010111f51d88f5cc2a308199f3030293dd9a010001019599f303154c0000000000000000000072ad01ef95018bdf8a0aee03d30d004a000003004bfa010aa9010dfd800e421525006d421d3373d04420102da5b7aa4235ec51c4413806456853fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa0662405501010ef01db0f6cc2aa8018899f3030793dd9a010001019c99f3031555000000068a010000000000739d01df9501acdf8a0ac0028a150031000003004bfa010aa8010d3b830e421561016d421dcddcd04420102d8edda94235cdccbe413806457353fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623f5401010ef01db8f8cc2a88029499f3030c93dd9a01000101a899f303155500000004480000000000728a018f9501e5df8a0aa9018d280015000003004bfa010aa8010ddd850e4215b3026d421dcd3cd04420112d2e9ba942359a99af413806458053fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623f5401010df01df0facc2ab802a199f3030d93dd9a01000101b599f303155500000005760000000000728b01f59401a2e08a0a9b01c12b0018000003004bfa010aa9010d4a870e421554036d421d66d6cf4420112d5f29a842355c8faa413806458753fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa0662405401010dea1d98fccc2aa801a899f3030793dd9a01000101bc99f303155400000007a4010000000000719701b29401bae08a0a9202be180026000003004bfa010aa7010da7870e421591036d421d33d3cf4420112d6329a942353333a7413806458953fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e5401010df51dc8fccc2a30aa99f3030293dd9a01000101be99f3031554000000022c0000000000719901db9401c3e08a0aae02a016002b000003004bfa010aa7010d1a880e4215b6036d421d33e3cf4420112ddc45aa423514aea3413806458b53fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e5501010df51df8fccc2a30ac99f3030293dd9a01000101c099f303155500000002320000000000719e01f69401d1e08a0a9f02b3170031000003004bfa010aa8010d50890e42154d046d421d3363d04420102da0b7a94235d7a3a2413806459253fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623f5401010edf1d88fecc2a9001b399f3030793dd9a01000101c799f303155400000000000000000000729a01e69501f7e08a0ab0028e16002d000003004bfa010aa9010d188c0e421573056d421d00c0ce4420102d300c84423514ae7741380645a053fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06624042010110da1dd080cd2ac802c199f3030e93dd9a01000101d599f303155500000009e2010000000000729801b19501afe18a0a97029018002a000003004bfa010aa7010d528c0e42159d056d421d3313cf4420102dfec98c423552b8c241380645a053fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e46010110da1df080cd2a20c299f3030193dd9a01000101d699f303154600000000000000000000729701df9501b8e18a0aa002b9170029000003004bfa010aa9010d198f0e42159e066d421d9a49d04420112dfae6a642359a999941380645ad53fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06624053010111e51da883cd2ab802cf99f3030d93dd9a01000101e399f30315540000000ca4020000000000729601c49501f1e18a0a9102dc180028000003004bfa010aa7010da68f0e4215e9066d421d9a19d044200f2d83dda74235ec519441380645b153fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e53010111e51df083cd2a48d299f3030393dd9a01000101e699f303155300000003400000000000729701de950183e28a0a8e02ff180028000003004bfa010aa7010d40900e42151a076d421d33c3cf4420102d717e9b423548e15e41380645b453fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e4d010110e51db884cd2a48d599f3030393dd9a01000101e999f303154d00000003420000000000729801bf950191e28a0a9a02f117002a000003004bfa010aa7010d5f900e42153c076d421d66c6cf44200f2de3028d4235713daa41380645b553fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e46010110da1dc884cd2a10d699f3030193dd9a01000101ea99f303154600000001120000000000729901bf950191e28a0a98029318002b000003004bfa010aa7010dae900e42153d076d421d9ad9cf44200f2d324fa342357b144241380645b653fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e51010110da1de884cd2a20d799f3030193dd9a01000101eb99f303155100000000000000000000729b01a5950196e28a0aa2029b17002c000003004bfa010aa7010d08910e42157e076d421d33b3cf4420102d51b79a42357b14b241380645b853fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623e4d010110da1d9885cd2a30d999f3030293dd9a01000101ed99f3031552000000022c0000000000729b01ca95019be28a0ab602e815002f000003004bfa010aa9010d3b930e42153f086d421d9a99d044200f2d5a3ca9423552b88441380645c153fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06624054010110f51d9087cd2af801e499f3030b93dd9a01000101f899f30315540000000bfa010000000000729901cf9501cee28a0ac502f814002e000003004bfa010aa9010df1950e421558096d421d6646d24420102da3a4a842357b149441380645cf53fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa0662405401010eea1dc889cd2ab802f199f3030d93dd9a01000101859af303155500000008be010000000000729901c7950190e38a0a9c02da17002c000003004bfa010aa9010dcf970e4215260a6d421d6676d34420112d653cab423552b89e41380645d853fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa0662405501010efa1ba08bcd2ad801fa99f3030993dd9a010001018e9af303155600000007a8010000000000729e01bb9501bae38a0ac00284150031000003004bfa010aa8010de89a0e4215510b6d421d00a0d44420112d1aaea74235cdcc6841380645e653fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06623f53010110f51d808ecd2ae002899af3030f93dd9a010001019d9af30315550000000460000000000073a401e59501fce38a0a9003e510003e000003004bfa010aa9010d6b9c0e4215b00b6d421d00b0d44420112dd46bac423585eb0541380645ed53fc5f48015a41050a0b1e29323334353637464850649601a401a601aa01ab01ad01b401b501b601b701b801c905ca05cb05cd05d105d205e605e705ef059c069e06a206a906aa06624056010110ea1da88fcd2aa801919af3030893dd9a01000101a59af303155600000008a801000000000073a201a19501a1e48a0a8103ce110038000003004bfa01"));
diff --git a/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java
index fc18b0560..7e3ec0706 100644
--- a/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Dsf22FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Dsf22FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Dsf22FrameDecoder();
+ var decoder = inject(new Dsf22FrameDecoder());
verifyFrame(
binary("4642000101A8EE5F0ECA5FF421B33F524E32610401"),
diff --git a/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java
index 4089c208c..2e52b950d 100644
--- a/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Dsf22ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Dsf22ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Dsf22ProtocolDecoder(null);
+ var decoder = inject(new Dsf22ProtocolDecoder(null));
verifyPositions(decoder, binary(
"4642a82d01c8f6aa1af1792c0c1411eb61001e0000"));
diff --git a/src/test/java/org/traccar/protocol/DualcamFrameDecoderTest.java b/src/test/java/org/traccar/protocol/DualcamFrameDecoderTest.java
index 46f32a8ae..f74a40d13 100644
--- a/src/test/java/org/traccar/protocol/DualcamFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DualcamFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class DualcamFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DualcamFrameDecoder();
+ var decoder = inject(new DualcamFrameDecoder());
verifyFrame(
binary("000000050001403a4abaa31444000400"),
diff --git a/src/test/java/org/traccar/protocol/DualcamProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DualcamProtocolDecoderTest.java
index 3dd11bdf7..a61f20c13 100644
--- a/src/test/java/org/traccar/protocol/DualcamProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DualcamProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DualcamProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DualcamProtocolDecoder(null);
+ var decoder = inject(new DualcamProtocolDecoder(null));
verifyNull(decoder, binary(
"000000050001403a4abaa31444000400"));
diff --git a/src/test/java/org/traccar/protocol/DwayProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/DwayProtocolDecoderTest.java
index 368f8b4ac..1cdd82664 100644
--- a/src/test/java/org/traccar/protocol/DwayProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/DwayProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class DwayProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new DwayProtocolDecoder(null);
+ var decoder = inject(new DwayProtocolDecoder(null));
verifyPosition(decoder, text(
"AA55,36,10024,1,171025,161055,36.0294,-79.7881,201, 2.5,111,1000,0000,00000,3578,0,0,0,D"));
diff --git a/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
index 5fda7fb28..ef319449e 100644
--- a/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EasyTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EasyTrackProtocolDecoder(null);
+ var decoder = inject(new EasyTrackProtocolDecoder(null));
verifyNotNull(decoder, text(
"*ET,354522180593498,JZ,0,20222,262,724,4#"));
diff --git a/src/test/java/org/traccar/protocol/EelinkProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EelinkProtocolDecoderTest.java
index c1cc3c39a..ec1467c09 100644
--- a/src/test/java/org/traccar/protocol/EelinkProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EelinkProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class EelinkProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EelinkProtocolDecoder(null);
+ var decoder = inject(new EelinkProtocolDecoder(null));
verifyPositions(decoder, binary(
"454c029249a50354679090044671676712004321315f3cf43503fc94d3760c79328a0129000000000a01f9000190330905580d2e046f118a04ec00000000ccc7086c02fe000000000000000000000000000000000000676712004321325f3cf43e03fc94d3760c79328a0129000000000901f9000190330905580d2e046f117b04ec00000000ccc7086d02ff000000000000000000000000000000000000676712004321335f3cf44703fc94d3760c79328a0129000000000901f9000190330905580d2e046f117f04ec00000000ccc7086d02ff000000000000000000000000000000000000676712004321345f3cf45303fc94d3760c79328a0129000000000901f9000190330905580d2e046f119d04ec00000000ccc7086d02ff000000000000000000000000000000000000676712004321355f3cf45c03fc94d3760c79328a0129000000000801f9000190330905580d2e046f11a304ec00000000ccc7086d02ff000000000000000000000000000000000000676712004321365f3cf46603fc94d3760c79328a0129000000000801f9000190330905580d2e046f118804df00000000ccc7086d02ff000000000000000000000000000000000000676712004321375f3cf47103fc94d3760c79328a0129000000000901f9000190330905580d2e046f119704ec00000000ccc7086d02ff000000000000000000000000000000000000676712004321385f3cf47a03fc94d3760c79328a0129000000000901f9000190330905580d2e046f118204ec00000000ccc7086e0300000000000000000000000000000000000000676712004321395f3cf48303fc94d3760c79328a0129000000000901f9000190330905580d2e046f117604df00000000ccc7086e0300000000000000000000000000000000000000"));
diff --git a/src/test/java/org/traccar/protocol/EgtsFrameDecoderTest.java b/src/test/java/org/traccar/protocol/EgtsFrameDecoderTest.java
index a1acb1e9d..dde71d1e7 100644
--- a/src/test/java/org/traccar/protocol/EgtsFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EgtsFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class EgtsFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EgtsFrameDecoder();
+ var decoder = inject(new EgtsFrameDecoder());
verifyFrame(
binary("0100020B0025003A5701C91A003A5701CD6E68490202101700CBB4740F7617FD924364104F116A0000000000010300001EC2"),
diff --git a/src/test/java/org/traccar/protocol/EgtsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EgtsProtocolDecoderTest.java
index dcf70bcae..0f5a40605 100644
--- a/src/test/java/org/traccar/protocol/EgtsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EgtsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EgtsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeWithObjectId() throws Exception {
- var decoder = new EgtsProtocolDecoder(null);
+ var decoder = inject(new EgtsProtocolDecoder(null));
verifyNull(decoder, binary(
"0100020b002300020001871c00020000010105190000ab0800006247396e615734366347467a63336476636d513daadf"));
@@ -31,7 +31,7 @@ public class EgtsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeWithAuth() throws Exception {
- var decoder = new EgtsProtocolDecoder(null);
+ var decoder = inject(new EgtsProtocolDecoder(null));
verifyNull(decoder, binary(
"0100010b002200c06401f21700c1640171360d00010101140071360d000238363539303500000000000000000047fc"));
diff --git a/src/test/java/org/traccar/protocol/EnforaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EnforaProtocolDecoderTest.java
index 14e982e39..2d2a211c3 100644
--- a/src/test/java/org/traccar/protocol/EnforaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EnforaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EnforaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EnforaProtocolDecoder(null);
+ var decoder = inject(new EnforaProtocolDecoder(null));
verifyNull(decoder, binary(
"000A08002020202020303131303730303030353730323637"));
diff --git a/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java
index 4afa5921f..0134e8052 100644
--- a/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EnnfuProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EnnfuProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EnnfuProtocolDecoder(null);
+ var decoder = inject(new EnnfuProtocolDecoder(null));
verifyPosition(decoder, text(
"Ennfu:354679095321652,041504.00,A,3154.86654,N,11849.08737,E,0.053,,080121,20,3.72,21.4,V0.01"));
diff --git a/src/test/java/org/traccar/protocol/EnvotechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EnvotechProtocolDecoderTest.java
index 0809a1e9a..50db6c743 100644
--- a/src/test/java/org/traccar/protocol/EnvotechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EnvotechProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EnvotechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EnvotechProtocolDecoder(null);
+ var decoder = inject(new EnvotechProtocolDecoder(null));
verifyPosition(decoder, text(
"$80IVM,03,E002215,E002215,110422061936,672763902,126423,0180,000000,00018600,0.0000'11042206193710406325S03966094E000118*42D6#"));
diff --git a/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java
index d0d9e3c41..2d9b19b70 100644
--- a/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EsealProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class EsealProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EsealProtocolDecoder(null);
+ var decoder = inject(new EsealProtocolDecoder(null));
verifyPosition(decoder, text(
"##S,eSeal,1000821,256,3.0.6,Normal,34,2017-08-31,08:14:40,15,A,25.708828N 100.372870W,10,0,Close,0.71,0:0:3:0,3.8,-73,E##"));
diff --git a/src/test/java/org/traccar/protocol/EskyFrameDecoderTest.java b/src/test/java/org/traccar/protocol/EskyFrameDecoderTest.java
index c3926c8d7..f808cd4a8 100644
--- a/src/test/java/org/traccar/protocol/EskyFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EskyFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class EskyFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EskyFrameDecoder();
+ var decoder = inject(new EskyFrameDecoder());
verifyNull(
decoder.decode(null, null, binary("00")));
diff --git a/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java
index ace55f934..678007f5c 100644
--- a/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/EskyProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class EskyProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new EskyProtocolDecoder(null);
+ var decoder = inject(new EskyProtocolDecoder(null));
verifyAttribute(decoder, text(
"ET;0;860337031066546;R;9+200717114059+41.32053+19.80761+0.30+0+0x2+8+40381744+0+1409+11"),
diff --git a/src/test/java/org/traccar/protocol/ExtremTracProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ExtremTracProtocolDecoderTest.java
index 29d11e02f..36a26bbe3 100644
--- a/src/test/java/org/traccar/protocol/ExtremTracProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ExtremTracProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ExtremTracProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ExtremTracProtocolDecoder(null);
+ var decoder = inject(new ExtremTracProtocolDecoder(null));
verifyPosition(decoder, text(
"$GPRMC,862106020628733,050859.000,A,1404.8573,N,08710.9967,W,0.00,0,080117,0,,00C8,00218,99,,,,,,0.00"));
diff --git a/src/test/java/org/traccar/protocol/FifotrackFrameDecoderTest.java b/src/test/java/org/traccar/protocol/FifotrackFrameDecoderTest.java
index 32657b277..417c49de5 100644
--- a/src/test/java/org/traccar/protocol/FifotrackFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FifotrackFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class FifotrackFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FifotrackFrameDecoder();
+ var decoder = inject(new FifotrackFrameDecoder());
verifyFrame(
binary("24243132362c3836393436373034393239303738372c324138432c4130312c2c3139303431333135333235342c412c2d31352e3132373836382c33392e3236323530362c302c3136322c3431352c38303937323234332c302c303030302c30302c302c3634337c337c353141467c424632462c3141337c3446367c3833327c302c312c2a3534"),
diff --git a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
index 6480d1dc4..ec08b432c 100644
--- a/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FifotrackProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class FifotrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FifotrackProtocolDecoder(null);
+ var decoder = inject(new FifotrackProtocolDecoder(null));
verifyPosition(decoder, buffer(
"$$95,866104023192332,1,A03,,210414055249,460|0|25FC|104C,4.18,100,000F,0,A,2,9,22.643175,114.018150*75"));
diff --git a/src/test/java/org/traccar/protocol/FlespiProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FlespiProtocolDecoderTest.java
index 88fdb0959..c794c9094 100644
--- a/src/test/java/org/traccar/protocol/FlespiProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FlespiProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class FlespiProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FlespiProtocolDecoder(null);
+ var decoder = inject(new FlespiProtocolDecoder(null));
verifyPositions(decoder, request(HttpMethod.POST, "/",
buffer("[{\"position.speed\":0,\"position.latitude\":53.90573,\"time.valid.status\":true,\"timestamp\":1506956075,\"position.satellites\":10,\"message.buffered.status\":false,\"business.mode.status\":true,\"gps.status\":true,\"position.longitude\":27.455848,\"position.direction\":0,\"ident\":\"605630\"},{\"siren.status\":false,\"business.mode.status\":true,\"position.satellites\":8,\"timestamp\":1506695785,\"led.status\":false,\"position.latitude\":53.905569,\"position.longitude\":27.455986,\"position.speed\":0,\"gradual.stop.status\":false,\"position.direction\":262.643854,\"hardware.version.enum\":223,\"vehicle.mileage\":160,\"message.buffered.status\":false,\"blinkers.status\":false,\"ident\":\"605630\",\"position.altitude\":233.48,\"immobilizer.status\":false}]")));
diff --git a/src/test/java/org/traccar/protocol/FlexApiProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FlexApiProtocolDecoderTest.java
index c819cd8bf..ffb8eb3a9 100644
--- a/src/test/java/org/traccar/protocol/FlexApiProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FlexApiProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FlexApiProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FlexApiProtocolDecoder(null);
+ var decoder = inject(new FlexApiProtocolDecoder(null));
verifyAttributes(decoder, text(
"${\"topic\":\"v1/VF3102021113001/motion/info\",\"payload\":{\"motion.ts\":1641885877,\"motion.ax\":0.006344,\"motion.ay\":0.289384,\"motion.az\":-0.939156,\"motion.gx\":0.420000,\"motion.gy\":0.420000,\"motion.gz\":-0.280000}}xx"));
diff --git a/src/test/java/org/traccar/protocol/FlexCommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FlexCommProtocolDecoderTest.java
index 3e988ba4f..ed44fc62e 100644
--- a/src/test/java/org/traccar/protocol/FlexCommProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FlexCommProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FlexCommProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FlexCommProtocolDecoder(null);
+ var decoder = inject(new FlexCommProtocolDecoder(null));
verifyPosition(decoder, text(
"7E00865067022408382201705302358271024932258006712785200700022601010224100040002C5002A2210001000000010012342107"));
diff --git a/src/test/java/org/traccar/protocol/FlexibleReportProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FlexibleReportProtocolDecoderTest.java
index 8763887a5..6b289396d 100644
--- a/src/test/java/org/traccar/protocol/FlexibleReportProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FlexibleReportProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FlexibleReportProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FlexibleReportProtocolDecoder(null);
+ var decoder = inject(new FlexibleReportProtocolDecoder(null));
verifyPosition(decoder, binary(
"7d010015875000013001001028fd98991830002e7fffffff0c28fd989903f6540a07f250ed00000f02f2140f5ea20000000000000202d4000a1f8b0100000708ffff"));
diff --git a/src/test/java/org/traccar/protocol/FlextrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FlextrackProtocolDecoderTest.java
index 0c1c18a0c..6e5ebf4cf 100644
--- a/src/test/java/org/traccar/protocol/FlextrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FlextrackProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class FlextrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FlextrackProtocolDecoder(null);
+ var decoder = inject(new FlextrackProtocolDecoder(null));
verifyNull(decoder, text(
"-1,LOGON,7000000123,8945000000"));
diff --git a/src/test/java/org/traccar/protocol/FoxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FoxProtocolDecoderTest.java
index 439a5553a..8e62c878e 100644
--- a/src/test/java/org/traccar/protocol/FoxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FoxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FoxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FoxProtocolDecoder(null);
+ var decoder = inject(new FoxProtocolDecoder(null));
verifyPosition(decoder, text(
"<fox><gps id=\"10\" data=\"51,A,010416,085317,4444.4158,N,02025.4466,E,1,182,,1110111111110111 141 0 0 0 0 0 10010000 10142,018C81851800009B\"/></fox>"));
diff --git a/src/test/java/org/traccar/protocol/FreedomProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FreedomProtocolDecoderTest.java
index c8f7a444b..1163b4e04 100644
--- a/src/test/java/org/traccar/protocol/FreedomProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FreedomProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FreedomProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FreedomProtocolDecoder(null);
+ var decoder = inject(new FreedomProtocolDecoder(null));
verifyPosition(decoder, text(
"IMEI,353358011714362,2014/05/22, 20:49:32, N, Lat:4725.9624, E, Lon:01912.5483, Spd:5.05"),
diff --git a/src/test/java/org/traccar/protocol/FreematicsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FreematicsProtocolDecoderTest.java
index 6a7a15397..a7ce042e5 100644
--- a/src/test/java/org/traccar/protocol/FreematicsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FreematicsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FreematicsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FreematicsProtocolDecoder(null);
+ var decoder = inject(new FreematicsProtocolDecoder(null));
verifyPositions(decoder, text(
"M0ZR4X0#0:204391,11:140221,10:8445000,A:49.215920,B:18.737755,C:410,D:0,E:208,24:1252,20:0;0;0,82:47*B5"));
diff --git a/src/test/java/org/traccar/protocol/FutureWayFrameDecoderTest.java b/src/test/java/org/traccar/protocol/FutureWayFrameDecoderTest.java
index b8eb3908e..a101ef45d 100644
--- a/src/test/java/org/traccar/protocol/FutureWayFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FutureWayFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class FutureWayFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FutureWayFrameDecoder();
+ var decoder = inject(new FutureWayFrameDecoder());
verifyFrame(
binary("343130303030303039424130303030344750533a562c3230303930323039333333332c302e3030303030304e2c302e303030303030452c302e3030302c302e3030300d0a574946493a332c317c39302d36372d31432d46372d32312d36437c353226327c38302d38392d31372d43362d37392d41307c353426337c34302d46342d32302d45462d44442d32417c35380d0a4c42533a3436302c302c34363437353036362c36390d0a36413432"),
diff --git a/src/test/java/org/traccar/protocol/FutureWayProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/FutureWayProtocolDecoderTest.java
index fbb0a2aba..e529d5c90 100644
--- a/src/test/java/org/traccar/protocol/FutureWayProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/FutureWayProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class FutureWayProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new FutureWayProtocolDecoder(null);
+ var decoder = inject(new FutureWayProtocolDecoder(null));
verifyNull(decoder, text(
"410000003F2000020,IMEI:354828100126461,battery level:6,network type:7,CSQ:236F42"));
diff --git a/src/test/java/org/traccar/protocol/GalileoFrameDecoderTest.java b/src/test/java/org/traccar/protocol/GalileoFrameDecoderTest.java
index 0d3199eab..a5aba3513 100644
--- a/src/test/java/org/traccar/protocol/GalileoFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GalileoFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class GalileoFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GalileoFrameDecoder();
+ var decoder = inject(new GalileoFrameDecoder());
assertEquals(
binary("011780011102e603383633353931303238393630323437043200801c"),
diff --git a/src/test/java/org/traccar/protocol/GalileoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GalileoProtocolDecoderTest.java
index 66b375b8a..d76fc5895 100644
--- a/src/test/java/org/traccar/protocol/GalileoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GalileoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GalileoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GalileoProtocolDecoder(null);
+ var decoder = inject(new GalileoProtocolDecoder(null));
verifyPositions(decoder, binary(
"011801018202130338363833343530333230343234323604640010a406207caa9f5b300c830a7901ca0ec802330000000034b802350540003e41703f422b1043234504004600e09000000000a000a100a200a300a400a500a600a700a800a900aa00ab00ac00ad00ae00af00b00000b10000b20000b30000b40000b50000b60000b70000b80000b90000c000000000c100000000c200000000c300000000c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d4d3140000d60000d70000d80000d90000da0000db00000000dc00000000dd00000000de00000000df00000000f000000000f100000000f200000000f300000000f400000000f500000000f600000000f700000000f800000000f9000000008960"));
diff --git a/src/test/java/org/traccar/protocol/GatorProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GatorProtocolDecoderTest.java
index 24686e220..bfb33de22 100644
--- a/src/test/java/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -17,7 +17,7 @@ public class GatorProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GatorProtocolDecoder(null);
+ var decoder = inject(new GatorProtocolDecoder(null));
verifyAttributes(decoder, binary(
"242480002600341cad190917022021812497260280594200000000c047010000135400009bb600ff00b90d"));
diff --git a/src/test/java/org/traccar/protocol/GenxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GenxProtocolDecoderTest.java
index 382c974ce..67a730f97 100644
--- a/src/test/java/org/traccar/protocol/GenxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GenxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GenxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GenxProtocolDecoder(null);
+ var decoder = inject(new GenxProtocolDecoder(null));
decoder.setReportColumns("28,2,3,4,13,17,10,23,27,11,7,8,46,56,59,70,74,75,77,89,90,93,99,107,112,113,114,176,175,178,181,182");
diff --git a/src/test/java/org/traccar/protocol/Gl100ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gl100ProtocolDecoderTest.java
index 50f993839..31ae1d5e8 100644
--- a/src/test/java/org/traccar/protocol/Gl100ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gl100ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Gl100ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gl100ProtocolDecoder(null);
+ var decoder = inject(new Gl100ProtocolDecoder(null));
verifyPosition(decoder, text(
"+RESP:GTLGL,359464030492644,1,2,1,0,0.4,0,299.7,1,5.455551,51.449776,20160311083229,0204,0016,03EC,BD94,00,0036,0102090501"));
diff --git a/src/test/java/org/traccar/protocol/Gl200BinaryProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gl200BinaryProtocolDecoderTest.java
index b8ce8af5d..cad70c35b 100644
--- a/src/test/java/org/traccar/protocol/Gl200BinaryProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gl200BinaryProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Gl200BinaryProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gl200BinaryProtocolDecoder(null);
+ var decoder = inject(new Gl200BinaryProtocolDecoder(null));
verifyPosition(decoder, binary(
"2b4556542d00fc1fbf0063450102020956325403000343056437f8220700000200000000010000160100f2007eff75a1f0025c6b1a07e1080108241a02680003189c1ac500000000000002100800000000000000000007e1080108241a19e24e4e0d0a"));
diff --git a/src/test/java/org/traccar/protocol/Gl200FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Gl200FrameDecoderTest.java
index 17eed8a59..51816222d 100644
--- a/src/test/java/org/traccar/protocol/Gl200FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gl200FrameDecoderTest.java
@@ -10,7 +10,7 @@ public class Gl200FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gl200FrameDecoder();
+ var decoder = inject(new Gl200FrameDecoder());
assertEquals(
binary("2b4c474e00ff0026fe110b07020106563454040d054905000007e4031911213905083abd0d0a"),
diff --git a/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
index 429ee15c7..6857feddc 100644
--- a/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Gl200TextProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gl200TextProtocolDecoder(null);
+ var decoder = inject(new Gl200TextProtocolDecoder(null));
verifyPosition(decoder, buffer(
"+RESP:GTFRI,5E0100,861971050039361,,,,10,1,1,10.4,140,196.9,-80.709946,35.016525,20220302220944,0310,0260,1CE9,52A1,00,0.0,,,,,420000,,,,20220302220948,1B0B$"));
diff --git a/src/test/java/org/traccar/protocol/GlobalSatProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
index 3f5296f4b..e244a835d 100644
--- a/src/test/java/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GlobalSatProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GlobalSatProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GlobalSatProtocolDecoder(null);
+ var decoder = inject(new GlobalSatProtocolDecoder(null));
verifyNull(decoder, text(
"GSh,131826789036289,3,M,ea04*3d"));
diff --git a/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
index 1dd5c2542..f0ba813ca 100644
--- a/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GlobalstarProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class GlobalstarProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GlobalstarProtocolDecoder(null);
+ var decoder = inject(new GlobalstarProtocolDecoder(null));
verifyNull(decoder, request(HttpMethod.POST, "/", buffer(
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
diff --git a/src/test/java/org/traccar/protocol/GnxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GnxProtocolDecoderTest.java
index 8bd5e2bd5..592c2de91 100644
--- a/src/test/java/org/traccar/protocol/GnxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GnxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GnxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GnxProtocolDecoder(null);
+ var decoder = inject(new GnxProtocolDecoder(null));
verifyPosition(decoder, text(
"$GNX_MIF,865733022354161,143,0,172642,180316,172642,180316,1,13.034581,N,080.234521,E,0,05396274,ROUTE_2#########,Deo ############,GNX04008,B0*"));
diff --git a/src/test/java/org/traccar/protocol/GoSafeProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GoSafeProtocolDecoderTest.java
index bb79f4f25..71ffbb587 100644
--- a/src/test/java/org/traccar/protocol/GoSafeProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GoSafeProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class GoSafeProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GoSafeProtocolDecoder(null);
+ var decoder = inject(new GoSafeProtocolDecoder(null));
verifyPositions(decoder, false, text(
"*GS06,357330050846344,RST#"));
diff --git a/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
index 373858c79..a6e3f2d69 100644
--- a/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GotopProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class GotopProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GotopProtocolDecoder(null);
+ var decoder = inject(new GotopProtocolDecoder(null));
verifyNull(decoder, text(
""));
diff --git a/src/test/java/org/traccar/protocol/Gps056FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Gps056FrameDecoderTest.java
index f6524f82b..cb75b4035 100644
--- a/src/test/java/org/traccar/protocol/Gps056FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gps056FrameDecoderTest.java
@@ -10,7 +10,7 @@ public class Gps056FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gps056FrameDecoder();
+ var decoder = inject(new Gps056FrameDecoder());
assertEquals(
binary("242435314750534c5f30323836323436323033333738323934361905110f160b0b7710584e1cbd1b9b4500005b100300fb0a071700ffff23"),
diff --git a/src/test/java/org/traccar/protocol/Gps056ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gps056ProtocolDecoderTest.java
index 01fa98ba4..ac3738644 100644
--- a/src/test/java/org/traccar/protocol/Gps056ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gps056ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Gps056ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gps056ProtocolDecoder(null);
+ var decoder = inject(new Gps056ProtocolDecoder(null));
verifyNull(decoder, buffer(
"$$25LOGN_118624620337829462.1#"));
diff --git a/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 79dc8ab7b..425fcd8ae 100644
--- a/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Gps103ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gps103ProtocolDecoder(null);
+ var decoder = inject(new Gps103ProtocolDecoder(null));
verifyPosition(decoder, text(
"imei:864035050002451,tracker,201223064947,,F,064947,A,1935.70640,N,09859.94436,W,0.025,;"));
diff --git a/src/test/java/org/traccar/protocol/GpsGateProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GpsGateProtocolDecoderTest.java
index c935fb3c2..a1f81b329 100644
--- a/src/test/java/org/traccar/protocol/GpsGateProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GpsGateProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GpsGateProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GpsGateProtocolDecoder(null);
+ var decoder = inject(new GpsGateProtocolDecoder(null));
verifyPosition(decoder, text(
"$FRCMD,0097,_SendMessage,,7618.51990,S,4002.26182,E,350.0,1.08,0.0,250816,183522.000,0*7F"));
diff --git a/src/test/java/org/traccar/protocol/GpsMarkerProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GpsMarkerProtocolDecoderTest.java
index c0b4966a8..bc7910779 100644
--- a/src/test/java/org/traccar/protocol/GpsMarkerProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GpsMarkerProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class GpsMarkerProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GpsMarkerProtocolDecoder(null);
+ var decoder = inject(new GpsMarkerProtocolDecoder(null));
verifyPosition(decoder, text(
"$GM23D863071014445404T260816142611N55441051E037325071033063C0530304#"));
diff --git a/src/test/java/org/traccar/protocol/GpsmtaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
index 7170718f6..d1326515f 100644
--- a/src/test/java/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GpsmtaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GpsmtaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GpsmtaProtocolDecoder(null);
+ var decoder = inject(new GpsmtaProtocolDecoder(null));
verifyPosition(decoder, text(
"3085a94ef459 1446536867 49.81621 24.054207 1 0 22 0 10 12 24 0 0"));
diff --git a/src/test/java/org/traccar/protocol/GranitFrameDecoderTest.java b/src/test/java/org/traccar/protocol/GranitFrameDecoderTest.java
index b4e24f961..a61e708f7 100644
--- a/src/test/java/org/traccar/protocol/GranitFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GranitFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class GranitFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GranitFrameDecoder();
+ var decoder = inject(new GranitFrameDecoder());
assertEquals(
binary("2b525243427e1a003e2934757c57b8b03c38d279b4e61e9bd7006b000000001c00002a4533"),
diff --git a/src/test/java/org/traccar/protocol/GranitProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/GranitProtocolDecoderTest.java
index 7fd5ffe0e..d2e181e09 100644
--- a/src/test/java/org/traccar/protocol/GranitProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/GranitProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class GranitProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new GranitProtocolDecoder(null);
+ var decoder = inject(new GranitProtocolDecoder(null));
verifyPositions(decoder, binary(
"2b444441547e8400c500040130050c43495808002839aee3150200000000640000000000000008002839aee3150200000000640000000000000008002839aee3150200000000640000000000000008002839aee3150200000000640000000000000008002839aee3150200000000640000000000000008002839aee3150200000000640000000000000014002a37420d0a"));
diff --git a/src/test/java/org/traccar/protocol/Gs100ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gs100ProtocolDecoderTest.java
index 68c9b8219..ce2768448 100644
--- a/src/test/java/org/traccar/protocol/Gs100ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gs100ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Gs100ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gs100ProtocolDecoder(null);
+ var decoder = inject(new Gs100ProtocolDecoder(null));
verifyNull(decoder, binary(
"474C490F383632343632303332353036373030133839333831303131363039313838343837323546084657312E302E3236"));
diff --git a/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
index 9d36ef346..25f59a948 100644
--- a/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt02ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Gt02ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gt02ProtocolDecoder(null);
+ var decoder = inject(new Gt02ProtocolDecoder(null));
verifyAttributes(decoder, binary(
"6868150000035889905895258400831c07415045584f4b210d0a"));
diff --git a/src/test/java/org/traccar/protocol/Gt06FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06FrameDecoderTest.java
index 059674398..a9d011277 100644
--- a/src/test/java/org/traccar/protocol/Gt06FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Gt06FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gt06FrameDecoder();
+ var decoder = inject(new Gt06FrameDecoder());
verifyFrame(
binary("787803691604130318491475905BD30E25001E10BBF7635D14759006E626560501CC0028660F213228660F1F2828660EA81E286610731428660F20140D0A"),
diff --git a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index b65b6709e..5b355e4f5 100644
--- a/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Gt06ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gt06ProtocolDecoder(null);
+ var decoder = inject(new Gt06ProtocolDecoder(null));
verifyNull(decoder, binary(
"787805120099abec0d0a"));
diff --git a/src/test/java/org/traccar/protocol/Gt30ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gt30ProtocolDecoderTest.java
index 24addc8b4..48c4306d6 100644
--- a/src/test/java/org/traccar/protocol/Gt30ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gt30ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Gt30ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Gt30ProtocolDecoder(null);
+ var decoder = inject(new Gt30ProtocolDecoder(null));
verifyPosition(decoder, text(
"$$005D3037811014 9955102834.000,A,3802.8629,N,02349.7163,E,0.00,,060117,,*13|1.3|26225BD"));
diff --git a/src/test/java/org/traccar/protocol/H02FrameDecoderTest.java b/src/test/java/org/traccar/protocol/H02FrameDecoderTest.java
index 2294b773b..c61c0f0c9 100644
--- a/src/test/java/org/traccar/protocol/H02FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/H02FrameDecoderTest.java
@@ -10,7 +10,7 @@ public class H02FrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeShort() throws Exception {
- var decoder = new H02FrameDecoder(0);
+ var decoder = inject(new H02FrameDecoder(0));
assertEquals(
binary("2a48512c3335353438383032303131333931312c56312c3031323934352c412c353233312e37393238332c4e2c30313332342e31303731382c452c302e30352c302c3137303231372c464646464646464623"),
@@ -37,7 +37,7 @@ public class H02FrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeLong() throws Exception {
- var decoder = new H02FrameDecoder(0);
+ var decoder = inject(new H02FrameDecoder(0));
assertEquals(
binary("24410600082621532131081504419390060740418306000000fffffbfdff0015060000002c02dc0c000000001f"),
@@ -48,7 +48,7 @@ public class H02FrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeAlternative() throws Exception {
- var decoder = new H02FrameDecoder(0);
+ var decoder = inject(new H02FrameDecoder(0));
assertEquals(
binary("2a48512c343230363131393133302c4e42522c3130323430332c3233382c312c302c372c313131312c323236342c36332c313131312c323236352c35382c313131312c323236362c35302c313131312c333133352c33372c313131312c3630352c33332c313131312c343932302c33302c313131312c3630372c32382c3131303131372c46464646444646462c3623"),
diff --git a/src/test/java/org/traccar/protocol/H02ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/H02ProtocolDecoderTest.java
index ad5f82176..278931466 100644
--- a/src/test/java/org/traccar/protocol/H02ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/H02ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class H02ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new H02ProtocolDecoder(null);
+ var decoder = inject(new H02ProtocolDecoder(null));
verifyPosition(decoder, buffer(
"*HQ,5905101893,V1,105759,A,37573392,S,145037022,E,000.00,173,280122,FF7FFBFF,,,9059e2c,8232,4#"));
@@ -270,7 +270,7 @@ public class H02ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeStatus() throws Exception {
- var decoder = new H02ProtocolDecoder(null);
+ var decoder = inject(new H02ProtocolDecoder(null));
verifyAttribute(decoder, buffer(
"*HQ,2705171109,V1,213324,A,5002.5849,N,01433.7822,E,0.00,000,140613,FFFFFFFF#"),
diff --git a/src/test/java/org/traccar/protocol/HaicomProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HaicomProtocolDecoderTest.java
index 9d80940ea..9d26d56c3 100644
--- a/src/test/java/org/traccar/protocol/HaicomProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HaicomProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class HaicomProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HaicomProtocolDecoder(null);
+ var decoder = inject(new HaicomProtocolDecoder(null));
verifyPosition(decoder, text(
"$GPRS012497007097169,T100001,150618,230031,5402267400332464,0004,2014,000001,,,1,00#V040*"),
diff --git a/src/test/java/org/traccar/protocol/HomtecsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HomtecsProtocolDecoderTest.java
index 192aa3010..8fe4d2c8b 100644
--- a/src/test/java/org/traccar/protocol/HomtecsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HomtecsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class HomtecsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HomtecsProtocolDecoder(null);
+ var decoder = inject(new HomtecsProtocolDecoder(null));
verifyNull(decoder, text(
"MDS0001_R6d1821f7,170323,143601.00,04,,,,,,,,,"));
diff --git a/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java
index 3ee0a5e01..ed7b0534b 100644
--- a/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HoopoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class HoopoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HoopoProtocolDecoder(null);
+ var decoder = inject(new HoopoProtocolDecoder(null));
verifyPosition(decoder, text(
"{ \"deviceId\": \"BCCD0654\", \"assetName\": \"BCCD0654\", \"assetType\": \"???? ?????? - ??? 8\", \"eventData\": { \"latitude\": 31.97498, \"longitude\": 34.80802, \"locationName\": \"\", \"accuracyLevel\": \"High\", \"eventType\": \"Arrival\", \"batteryLevel\": 100, \"receiveTime\": \"2021-09-20T18:52:32Z\" }, \"eventTime\": \"2021-09-20T08:52:02Z\", \"serverReportTime\": \"0001-01-01T00:00:00Z\" }"));
diff --git a/src/test/java/org/traccar/protocol/HuaShengFrameDecoderTest.java b/src/test/java/org/traccar/protocol/HuaShengFrameDecoderTest.java
index 228f41ee8..991e0b36d 100644
--- a/src/test/java/org/traccar/protocol/HuaShengFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HuaShengFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class HuaShengFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HuaShengFrameDecoder();
+ var decoder = inject(new HuaShengFrameDecoder());
assertEquals(
binary("c0010c00120060000000000004000600010100c0"),
diff --git a/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
index 74671b845..7002d7e88 100644
--- a/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HuaShengProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class HuaShengProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HuaShengProtocolDecoder(null);
+ var decoder = inject(new HuaShengProtocolDecoder(null));
verifyNull(decoder, binary(
"c00000007eaa000000000000cb8000000032313130313030393238323800e9abafffd615d2000000000008000000010015ffffff0000000000000004e7ffffffffff0005000a10080001d5ab000900154b4e4142323531324d4b54353638363630000f00133335343434343131353130333138380014000b00000000000000c0"));
diff --git a/src/test/java/org/traccar/protocol/HuabaoFrameDecoderTest.java b/src/test/java/org/traccar/protocol/HuabaoFrameDecoderTest.java
index d4789032d..6b902fb46 100644
--- a/src/test/java/org/traccar/protocol/HuabaoFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HuabaoFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class HuabaoFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HuabaoFrameDecoder();
+ var decoder = inject(new HuabaoFrameDecoder());
verifyFrame(
binary("283734303139303331313138352c312c3030312c454c4f434b2c332c35323934333929"),
diff --git a/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java
index c45effbc5..0b36b8f4d 100644
--- a/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HuabaoProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class HuabaoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HuabaoProtocolDecoder(null);
+ var decoder = inject(new HuabaoProtocolDecoder(null));
verifyNull(decoder, buffer(
"(794104004140,1,001,BASE,2,TIME)"));
diff --git a/src/test/java/org/traccar/protocol/HunterProProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/HunterProProtocolDecoderTest.java
index 81fdae95c..5503ab02c 100644
--- a/src/test/java/org/traccar/protocol/HunterProProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/HunterProProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class HunterProProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new HunterProProtocolDecoder(null);
+ var decoder = inject(new HunterProProtocolDecoder(null));
verifyPosition(decoder, text(
">0002<$GPRMC,170559.000,A,0328.3045,N,07630.0735,W,0.73,266.16,200816,,,A77, s000078015180\",0MD"));
diff --git a/src/test/java/org/traccar/protocol/IdplProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/IdplProtocolDecoderTest.java
index a5141c389..1bd52ce89 100644
--- a/src/test/java/org/traccar/protocol/IdplProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/IdplProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class IdplProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new IdplProtocolDecoder(null);
+ var decoder = inject(new IdplProtocolDecoder(null));
verifyPosition(decoder, text(
"*ID1,863071011086474,210314,153218,A,1831.4577,N,07351.1433,E,0.79,240.64,9,20,A,1,4.20,0,1,01,1,0,0,A01,R,935D#"),
diff --git a/src/test/java/org/traccar/protocol/IntellitracProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/IntellitracProtocolDecoderTest.java
index ee3a25cbe..b6e12aef5 100644
--- a/src/test/java/org/traccar/protocol/IntellitracProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/IntellitracProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class IntellitracProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new IntellitracProtocolDecoder(null);
+ var decoder = inject(new IntellitracProtocolDecoder(null));
verifyPosition(decoder, text(
"359316075744331,20201008181424,12.014662,57.826301,0,76,24,10,997,3,0,0.000,4.208,20201008181424,0"));
diff --git a/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
index ca72874ef..c668084a1 100644
--- a/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/IotmProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class IotmProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new IotmProtocolDecoder(null);
+ var decoder = inject(new IotmProtocolDecoder(null));
verifyNull(decoder, MqttMessageBuilders.connect().clientId(
"123456789012345").build());
diff --git a/src/test/java/org/traccar/protocol/ItsFrameDecoderTest.java b/src/test/java/org/traccar/protocol/ItsFrameDecoderTest.java
index 363185b4c..26f28916c 100644
--- a/src/test/java/org/traccar/protocol/ItsFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ItsFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class ItsFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ItsFrameDecoder();
+ var decoder = inject(new ItsFrameDecoder());
verifyFrame(
binary("242c2c3836383732383033373731373434312c312e3444335f4149533134305f312e302c56455253494f4e312e302c32382e3633333731372c4e2c37372e3232323730322c45"),
diff --git a/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java
index dfd86969a..dd8d3a0d9 100644
--- a/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ItsProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class ItsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ItsProtocolDecoder(null);
+ var decoder = inject(new ItsProtocolDecoder(null));
verifyNull(decoder, text(
"$,LGN,MARK,000000000,358980100077446,V0.0.1,AIS140,19.804487,N,75.225876,E,*"));
diff --git a/src/test/java/org/traccar/protocol/Ivt401ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Ivt401ProtocolDecoderTest.java
index 8a71cb4d5..b08dff4e7 100644
--- a/src/test/java/org/traccar/protocol/Ivt401ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Ivt401ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Ivt401ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Ivt401ProtocolDecoder(null);
+ var decoder = inject(new Ivt401ProtocolDecoder(null));
verifyPosition(decoder, text(
"(TLA,356917051007891,190118,090211,+16.986606,+82.242416,0,66,4,13,1,5,000,00,0.0,11.59,8.30,37.77,0.0,1,1.02,0,0,208,0,0,0,0,000000000,0,0,0,0,0,0,0,1,8654604,5,9,114)"));
diff --git a/src/test/java/org/traccar/protocol/JidoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/JidoProtocolDecoderTest.java
index 9e01d7d68..b275e6d01 100644
--- a/src/test/java/org/traccar/protocol/JidoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/JidoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class JidoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new JidoProtocolDecoder(null);
+ var decoder = inject(new JidoProtocolDecoder(null));
verifyPosition(decoder, text(
"*12345678910101000,01,A,130517,160435,1820.5845,N,07833.2478,E,20,0,067,045,05,28,26,1,075,Y,1,0000,0000,0000,59"));
diff --git a/src/test/java/org/traccar/protocol/JpKorjarProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/JpKorjarProtocolDecoderTest.java
index 13137006c..a1b0acac5 100644
--- a/src/test/java/org/traccar/protocol/JpKorjarProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/JpKorjarProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class JpKorjarProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new JpKorjarProtocolDecoder(null);
+ var decoder = inject(new JpKorjarProtocolDecoder(null));
verifyPosition(decoder, text(
"KORJAR.PL,329587014519383,160910144240,52.247254N,021.013375E,0.00,1,F:4.18V,1 260 01 794B 3517,"));
diff --git a/src/test/java/org/traccar/protocol/JsonFrameDecoderTest.java b/src/test/java/org/traccar/protocol/JsonFrameDecoderTest.java
index 42777e419..1bc5d8480 100644
--- a/src/test/java/org/traccar/protocol/JsonFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/JsonFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class JsonFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new JsonFrameDecoder();
+ var decoder = inject(new JsonFrameDecoder());
verifyFrame(
binary("7b226465764964223a2243485a4430384b504430323130343235303436222c2264657654797065223a322c226861726456657273696f6e223a224844545456413139222c226d736754797065223a3131302c2270726f746f636f6c56657273696f6e223a225631222c22736f667456657273696f6e223a22332e312e38222c22737769746368436162537461747573223a2231222c2274786e4e6f223a2231363235323132373431353337227d"),
diff --git a/src/test/java/org/traccar/protocol/Jt600FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Jt600FrameDecoderTest.java
index eda97ba2d..8e408e50f 100644
--- a/src/test/java/org/traccar/protocol/Jt600FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Jt600FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Jt600FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Jt600FrameDecoder();
+ var decoder = inject(new Jt600FrameDecoder());
verifyFrame(
binary("2480413009781914003406102107544354193631006213423b00000000006c070000000020e064f91ea0671d00020f0f0f0f0f0f0f0f0f0f07f100ea0f6e"),
diff --git a/src/test/java/org/traccar/protocol/Jt600ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Jt600ProtocolDecoderTest.java
index 3bf01c1ae..c8db31ad0 100644
--- a/src/test/java/org/traccar/protocol/Jt600ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Jt600ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Jt600ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Jt600ProtocolDecoder(null);
+ var decoder = inject(new Jt600ProtocolDecoder(null));
verifyPosition(decoder, buffer(
"(8000632862,P45,290322,132412,25.28217,S,57.54683,W,A,0,0,5,0,0000000000,0,0,9,0)"));
diff --git a/src/test/java/org/traccar/protocol/KenjiProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/KenjiProtocolDecoderTest.java
index 53ef1d5ca..a705d8082 100755
--- a/src/test/java/org/traccar/protocol/KenjiProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/KenjiProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class KenjiProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new KenjiProtocolDecoder(null);
+ var decoder = inject(new KenjiProtocolDecoder(null));
verifyPosition(decoder, text(
">C800000,M005004,O0000,I0002,D124057,A,S3137.2783,W05830.2978,T000.0,H254.3,Y240116,G06*17"),
diff --git a/src/test/java/org/traccar/protocol/KhdProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/KhdProtocolDecoderTest.java
index 5c2b0732b..155493bea 100644
--- a/src/test/java/org/traccar/protocol/KhdProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/KhdProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class KhdProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new KhdProtocolDecoder(null);
+ var decoder = inject(new KhdProtocolDecoder(null));
verifyPosition(decoder, binary(
"2929800028258b8c10210731035840031534240542120200000337fb000000ffff5a00000a0000000005005d0d"));
diff --git a/src/test/java/org/traccar/protocol/L100FrameDecoderTest.java b/src/test/java/org/traccar/protocol/L100FrameDecoderTest.java
index 45c69105b..084ae0498 100644
--- a/src/test/java/org/traccar/protocol/L100FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/L100FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class L100FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new L100FrameDecoder();
+ var decoder = inject(new L100FrameDecoder());
verifyFrame(
binary("41544c2c4c2c3836383334353033383137313936332c4e2c3230313231382c3039333031362c412c3032352e3036373134342c4e2c3035352e3134343833332c452c3030302e302c4750532c333933392c3432342c30332c30303430352c303038383334"),
diff --git a/src/test/java/org/traccar/protocol/L100ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/L100ProtocolDecoderTest.java
index d4bef3885..56281cda0 100644
--- a/src/test/java/org/traccar/protocol/L100ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/L100ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class L100ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new L100ProtocolDecoder(null);
+ var decoder = inject(new L100ProtocolDecoder(null));
verifyPosition(decoder, text(
"ATL,NP,868004029750174,$GPRMC,062943,A,2533.6719,N,09154.3203,E,0,179,311218,,,*39,#01111011000000,0,0,0,934.82,27.13,4.0,25,405,755,15af,974b,0,0,0,ATL"));
diff --git a/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java
index c407d1e64..45544241f 100644
--- a/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/LacakProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class LacakProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new LacakProtocolDecoder(null);
+ var decoder = inject(new LacakProtocolDecoder(null));
verifyPosition(decoder, request(HttpMethod.POST, "/",
buffer("{\"location\":{\"event\":\"motionchange\",\"is_moving\":false,\"uuid\":\"0e9a2473-a9a7-4c00-997b-fb97d2154e75\",\"timestamp\":\"2021-07-21T08:06:34.444Z\",\"odometer\":0,\"coords\":{\"latitude\":-6.1148096,\"longitude\":106.6837015,\"accuracy\":3.8,\"speed\":18.67,\"speed_accuracy\":0.26,\"heading\":63,\"heading_accuracy\":0.28,\"altitude\":35.7,\"altitude_accuracy\":3.8},\"activity\":{\"type\":\"still\",\"confidence\":100},\"battery\":{\"is_charging\":false,\"level\":0.79},\"extras\":{}},\"device_id\":\"8737767034\"}")));
diff --git a/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java
index 1d5819603..aacf9abc8 100644
--- a/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/LaipacProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class LaipacProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new LaipacProtocolDecoder(null);
+ var decoder = inject(new LaipacProtocolDecoder(null));
verifyPosition(decoder, text(
"$AVRMC,80006405,212645,r,3013.9938,N,08133.3998,W,0.00,0.00,010317,a,4076,0,1,0,0,53170583,310260*78"));
diff --git a/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java
index aed82eb41..ea31bc99d 100644
--- a/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/LeafSpyProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class LeafSpyProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new LeafSpyProtocolDecoder(null);
+ var decoder = inject(new LeafSpyProtocolDecoder(null));
verifyNull(decoder, request(
"/?Lat=60.0&Long=30.0"));
diff --git a/src/test/java/org/traccar/protocol/M2cProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/M2cProtocolDecoderTest.java
index ede056f96..674738c82 100644
--- a/src/test/java/org/traccar/protocol/M2cProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/M2cProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class M2cProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new M2cProtocolDecoder(null);
+ var decoder = inject(new M2cProtocolDecoder(null));
verifyPositions(decoder, text(
"[#M2C,2020,P1.B1.H3.F9.R1,102,864547034433966,1,L,0,20,171221,062016,28.647552,77.192841,0,0,0.0,0,0,64,255,11983,0,0,0,0.0,0,0,0,404,4,1F6,4D77,31,0*7524\r\n",
diff --git a/src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java
index f318dcfef..0d812ebfc 100644
--- a/src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class M2mProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new M2mProtocolDecoder(null);
+ var decoder = inject(new M2mProtocolDecoder(null));
verifyNull(decoder, binary(
"235A3C2A2624215C287D70212A21254C7C6421220B0B0B"));
diff --git a/src/test/java/org/traccar/protocol/MaestroProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MaestroProtocolDecoderTest.java
index 19f9b9da7..be0fe502e 100644
--- a/src/test/java/org/traccar/protocol/MaestroProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MaestroProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class MaestroProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MaestroProtocolDecoder(null);
+ var decoder = inject(new MaestroProtocolDecoder(null));
verifyPosition(decoder, text(
"@353893040202807,705,UPV-02,1,13.2,17,0,0,16/09/11,11:42:49,0.352705,32.647918,1210.5,0.000000,35.33,11,0.8,0.000,0!\0"));
diff --git a/src/test/java/org/traccar/protocol/ManPowerProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ManPowerProtocolDecoderTest.java
index 74f3ff1ec..a77043b9d 100644
--- a/src/test/java/org/traccar/protocol/ManPowerProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ManPowerProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ManPowerProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ManPowerProtocolDecoder(null);
+ var decoder = inject(new ManPowerProtocolDecoder(null));
verifyPosition(decoder, text(
"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/src/test/java/org/traccar/protocol/Mavlink2ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Mavlink2ProtocolDecoderTest.java
index ccddb6a11..0c74d4772 100644
--- a/src/test/java/org/traccar/protocol/Mavlink2ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Mavlink2ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Mavlink2ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Mavlink2ProtocolDecoder(null);
+ var decoder = inject(new Mavlink2ProtocolDecoder(null));
verifyAttributes(decoder, binary(
"fd1c0000ce01012100004da91f004005d323b89aa30ea6ed070099fb0100f7fffdff0000942c4a88"));
diff --git a/src/test/java/org/traccar/protocol/MegastekFrameDecoderTest.java b/src/test/java/org/traccar/protocol/MegastekFrameDecoderTest.java
index 19e5cb0ab..854564cd2 100644
--- a/src/test/java/org/traccar/protocol/MegastekFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MegastekFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class MegastekFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MegastekFrameDecoder();
+ var decoder = inject(new MegastekFrameDecoder());
verifyFrame(
binary("30313337244d47563030322c3335343535303035303239323636392c4756543930302c522c3134313231352c3033313830342c412c2c532c2c452c30302c30332c30302c332e36372c302e3030302c302e30302c3131372e312c302e302c3531302c31302c2c2c2c303030302c303030302c32322c31322c302c202c202c2c312d312c39382c5057204f4e3b21"),
diff --git a/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
index 83d62e766..ea55a8b1c 100644
--- a/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MegastekProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MegastekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MegastekProtocolDecoder(null);
+ var decoder = inject(new MegastekProtocolDecoder(null));
verifyPosition(decoder, text(
"$MGV002,860719020193193,,S,070521,160748,V,2255.09165,N,11404.01322,E,00,00,00,,,,,,,,,,,,,,,,,,,10,015,Restart;!"));
diff --git a/src/test/java/org/traccar/protocol/MeiligaoFrameDecoderTest.java b/src/test/java/org/traccar/protocol/MeiligaoFrameDecoderTest.java
index c0e5f1e97..379cf28f9 100644
--- a/src/test/java/org/traccar/protocol/MeiligaoFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MeiligaoFrameDecoderTest.java
@@ -11,7 +11,7 @@ public class MeiligaoFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MeiligaoFrameDecoder();
+ var decoder = inject(new MeiligaoFrameDecoder());
assertNull(
decoder.decode(null, null, binary("00")));
diff --git a/src/test/java/org/traccar/protocol/MeiligaoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
index 087701be4..4c6eae847 100644
--- a/src/test/java/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MeiligaoProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MeiligaoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MeiligaoProtocolDecoder(null);
+ var decoder = inject(new MeiligaoProtocolDecoder(null));
verifyAttribute(decoder, binary(
"2424008f142180340967ff99553033333233302e3030302c412c313531362e383039392c4e2c31303435322e383835352c452c302e30302c33332c3038313232302c2c2a33367c302e387c3132337c323130307c303030302c303030302c303230452c303241417c30323038303030353038394530304531434638347c31437c31373243353832437c3042a8060d0a"),
diff --git a/src/test/java/org/traccar/protocol/MeitrackFrameDecoderTest.java b/src/test/java/org/traccar/protocol/MeitrackFrameDecoderTest.java
index 38d0f2f92..a55935ed2 100644
--- a/src/test/java/org/traccar/protocol/MeitrackFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MeitrackFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class MeitrackFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MeitrackFrameDecoder();
+ var decoder = inject(new MeitrackFrameDecoder());
assertEquals(
binary("24244e3132372c3836333037313031333830333036362c4141412c33352c2d312e3330323638302c33362e3835323133352c3135303430393231313032362c412c392c302c302e312c302c352c313635332c343039362c33323634382c3633397c30327c313030347c3930432c303030302c307c307c307c3346467c3330302c2a37430d0a"),
diff --git a/src/test/java/org/traccar/protocol/MeitrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MeitrackProtocolDecoderTest.java
index 1c90468bd..d4ecae10a 100644
--- a/src/test/java/org/traccar/protocol/MeitrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MeitrackProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MeitrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MeitrackProtocolDecoder(null);
+ var decoder = inject(new MeitrackProtocolDecoder(null));
verifyPositions(decoder, binary(
"2424423233392c3836323039303035303030373436352c4343452c0100000003004300130006050006000700140015801b00080800000900000a00000b0000165105198d011a630540160005024c5e910103590bfe0204922153290c6b2501000dd5b50200004300130006050006000700140015011b00080800000900000a00000b0000165005198d011a630540010005024c5e910103590bfe0204932153290c6b2501000dd6b50200004300130006050006000700140015011b00080800000900000a00000b0000165205198d011a630540230005024c5e910103590bfe0204942153290c6b2501000dd7b50200002a43330d0a"));
diff --git a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
index ca8b67a46..5e36abe5b 100644
--- a/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MictrackProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MictrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeStandard() throws Exception {
- var decoder = new MictrackProtocolDecoder(null);
+ var decoder = inject(new MictrackProtocolDecoder(null));
verifyAttributes(decoder, text(
"MT;5;867035041396795;Y1;220111085741+test,8c:53:c3:db:e7:26,-58,jiuide-842,80:26:89:f0:5e:4f,-74,jiu2ide 403,94:e4:4b:0a:31:08,-75,jiu3ide,7a:91:e9:50:26:0b,-85,CNet-9rNe,78:91:e9:40:26:0b,-87+0+4092+1"));
@@ -48,7 +48,7 @@ public class MictrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeLowAltitude() throws Exception {
- var decoder = new MictrackProtocolDecoder(null);
+ var decoder = inject(new MictrackProtocolDecoder(null));
verifyPositions(decoder, text(
"861836051888035$162835.00,A,4139.6460,N,07009.7239,W,,41.53,-25.8,220621"));
diff --git a/src/test/java/org/traccar/protocol/MilesmateProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MilesmateProtocolDecoderTest.java
index 69fd82886..275672554 100644
--- a/src/test/java/org/traccar/protocol/MilesmateProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MilesmateProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class MilesmateProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MilesmateProtocolDecoder(null);
+ var decoder = inject(new MilesmateProtocolDecoder(null));
verifyPosition(decoder, text(
"ApiString={A:861359037373030,B:09.8,C:00.0,D:083506,E:2838.5529N,F:07717.8049E,G:000.00,H:170918,I:G,J:00004100,K:0000000A,L:1234,M:126.86}"));
diff --git a/src/test/java/org/traccar/protocol/MiniFinderProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
index 1a9756226..a8f1be855 100644
--- a/src/test/java/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MiniFinderProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MiniFinderProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MiniFinderProtocolDecoder(null);
+ var decoder = inject(new MiniFinderProtocolDecoder(null));
verifyNull(decoder, text(
"!1,867273023933661,V07S.5701.1621,100"));
diff --git a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
index 1813a5370..a6006d6a7 100644
--- a/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Minifinder2ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Minifinder2ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Minifinder2ProtocolDecoder(null);
+ var decoder = inject(new Minifinder2ProtocolDecoder(null));
verifyPositions(decoder, binary(
"AB103D0035A700000110013836373733303035333430333237390924AC5783620103C250162030CC5F0D5002FB432D00AF005A3158006D0A00000B0931EC5783620A000000"));
diff --git a/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
index ddfa6ad8b..fea74db7a 100644
--- a/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MobilogixProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MobilogixProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MobilogixProtocolDecoder(null);
+ var decoder = inject(new MobilogixProtocolDecoder(null));
verifyAttributes(decoder, text(
"[2021-08-20 19:27:14,T14,1,V1.3.5,201909000982,53,12.18"));
diff --git a/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java
index af19b8222..82781550e 100644
--- a/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MoovboxProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class MoovboxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MoovboxProtocolDecoder(null);
+ var decoder = inject(new MoovboxProtocolDecoder(null));
verifyPositions(decoder, request(HttpMethod.POST, "/",
buffer("<gps id=\"911\">\n<coordinates><coordinate>\n<fix>3</fix>\n<time>1597580050</time>\n<latitude>100.726257</latitude>\n<longitude>13.821351</longitude>\n<altitude>9.500000</altitude>\n<climb>0.000000</climb>\n<speed>0.064000</speed>\n<separation>-27.300000</separation>\n<track>0.000000</track>\n<satellites>9</satellites>\n</coordinate></coordinates>\n</gps>")));
diff --git a/src/test/java/org/traccar/protocol/MotorProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MotorProtocolDecoderTest.java
index bd4a97ef4..f3ebb8e5c 100644
--- a/src/test/java/org/traccar/protocol/MotorProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MotorProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class MotorProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MotorProtocolDecoder(null);
+ var decoder = inject(new MotorProtocolDecoder(null));
verifyPosition(decoder, text(
"341200007E7E00007E7E020301803955352401161766210162090501010108191625132655351234567F12345F"));
diff --git a/src/test/java/org/traccar/protocol/MtxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MtxProtocolDecoderTest.java
index 28b5d3be0..8a5e228c7 100644
--- a/src/test/java/org/traccar/protocol/MtxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MtxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class MtxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MtxProtocolDecoder(null);
+ var decoder = inject(new MtxProtocolDecoder(null));
verifyPosition(decoder, text(
"#MTX,353815011138124,20101226,195550,41.6296399,002.3611174,000,035,000000.00,X,X,1111,000,0,0"));
diff --git a/src/test/java/org/traccar/protocol/MxtProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/MxtProtocolDecoderTest.java
index 301b6102b..68a68c9e8 100644
--- a/src/test/java/org/traccar/protocol/MxtProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/MxtProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class MxtProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new MxtProtocolDecoder(null);
+ var decoder = inject(new MxtProtocolDecoder(null));
verifyPosition(decoder, binary(
"01a631a7627b00087dc41c40850006aab70affecdf23fd32200080000600000000000000000000001b2ff03b1bb9c4c60214f40100050000006c2d0000f427600051051101de0704"));
diff --git a/src/test/java/org/traccar/protocol/NavigilProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NavigilProtocolDecoderTest.java
index 60d88999e..8eda687cc 100644
--- a/src/test/java/org/traccar/protocol/NavigilProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavigilProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NavigilProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NavigilProtocolDecoder(null);
+ var decoder = inject(new NavigilProtocolDecoder(null));
verifyNull(decoder, binary(
"01004300040020000000f60203080200e7cd0f510c0000003b00000000000000"));
diff --git a/src/test/java/org/traccar/protocol/NavisProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NavisProtocolDecoderTest.java
index b1282cac7..5c841b211 100644
--- a/src/test/java/org/traccar/protocol/NavisProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavisProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class NavisProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeNtcb() throws Exception {
- var decoder = new NavisProtocolDecoder(null);
+ var decoder = inject(new NavisProtocolDecoder(null));
verifyNull(decoder, binary(
"404E5443010000007B000000130044342A3E533A383631373835303035323035303739"));
@@ -41,7 +41,7 @@ public class NavisProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeFlex10() throws Exception {
- var decoder = new NavisProtocolDecoder(null);
+ var decoder = inject(new NavisProtocolDecoder(null));
verifyNull(decoder, binary(
"404e544301000000c9b5f602130046c52a3e533a383639363936303439373232383235"));
@@ -60,7 +60,7 @@ public class NavisProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeFlex20() throws Exception {
- var decoder = new NavisProtocolDecoder(null);
+ var decoder = inject(new NavisProtocolDecoder(null));
verifyNull(decoder, binary(
"404e544301000000a9eef602130043fb2a3e533a383639363936303439373337333835"));
diff --git a/src/test/java/org/traccar/protocol/NavisetFrameDecoderTest.java b/src/test/java/org/traccar/protocol/NavisetFrameDecoderTest.java
index e73c173b7..d15d01cc0 100644
--- a/src/test/java/org/traccar/protocol/NavisetFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavisetFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class NavisetFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NavisetFrameDecoder();
+ var decoder = inject(new NavisetFrameDecoder());
verifyFrame(
binary("1310e4073836383230343030353935383436362a060716"),
diff --git a/src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java
index df4e57e8d..d7643b50c 100644
--- a/src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavisetProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NavisetProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NavisetProtocolDecoder(null);
+ var decoder = inject(new NavisetProtocolDecoder(null));
verifyNull(decoder, binary(
"1310e4073836383230343030353935383436362a060716"));
diff --git a/src/test/java/org/traccar/protocol/NavtelecomFrameDecoderTest.java b/src/test/java/org/traccar/protocol/NavtelecomFrameDecoderTest.java
index 562b220d4..360f92447 100644
--- a/src/test/java/org/traccar/protocol/NavtelecomFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavtelecomFrameDecoderTest.java
@@ -9,7 +9,7 @@ public class NavtelecomFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NavtelecomFrameDecoder();
+ var decoder = inject(new NavtelecomFrameDecoder());
verifyFrame(
binary("404e5443010000000000000013004e452a3e533a383636373935303331343130363839"),
@@ -28,7 +28,7 @@ public class NavtelecomFrameDecoderTest extends ProtocolTest {
@Test
public void testDecodeFull() throws Exception {
- var decoder = new NavtelecomFrameDecoder();
+ var decoder = inject(new NavtelecomFrameDecoder());
verifyFrame(
binary("404e5443010000000000000013004e452a3e533a383636373935303331343130363839"),
diff --git a/src/test/java/org/traccar/protocol/NavtelecomProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NavtelecomProtocolDecoderTest.java
index fd22049fc..301a72b2a 100644
--- a/src/test/java/org/traccar/protocol/NavtelecomProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NavtelecomProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NavtelecomProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NavtelecomProtocolDecoder(null);
+ var decoder = inject(new NavtelecomProtocolDecoder(null));
verifyNull(decoder, binary(
"404e5443010000000000000013004e452a3e533a383636373935303331343130363839"));
diff --git a/src/test/java/org/traccar/protocol/NeosProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NeosProtocolDecoderTest.java
index b77bdf658..4e9e55f62 100644
--- a/src/test/java/org/traccar/protocol/NeosProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NeosProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NeosProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NeosProtocolDecoder(null);
+ var decoder = inject(new NeosProtocolDecoder(null));
verifyPosition(decoder, text(
">12345678,1,1,070201,144111,W05829.2613,S3435.2313,,00,034,25,00,126-000,0,3,11111111*2d!\r\n"));
diff --git a/src/test/java/org/traccar/protocol/NetProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NetProtocolDecoderTest.java
index 9ab4aea4f..239d892f8 100644
--- a/src/test/java/org/traccar/protocol/NetProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NetProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NetProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NetProtocolDecoder(null);
+ var decoder = inject(new NetProtocolDecoder(null));
verifyPosition(decoder, text(
"@L03686090604017761712271020161807037078881037233751000000010F850036980A4000"));
diff --git a/src/test/java/org/traccar/protocol/NiotProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NiotProtocolDecoderTest.java
index 7707094a5..03aaa49aa 100644
--- a/src/test/java/org/traccar/protocol/NiotProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NiotProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NiotProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NiotProtocolDecoder(null);
+ var decoder = inject(new NiotProtocolDecoder(null));
verifyPosition(decoder, binary(
"585880004c08675430347318522007161451458024b28003f566ee00000328f8000748217ffc500729007a280000000000160001383932353430323130363431363738373136323100050002004e00570d"),
diff --git a/src/test/java/org/traccar/protocol/NoranProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NoranProtocolDecoderTest.java
index a30847160..3f1ec7aee 100644
--- a/src/test/java/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NoranProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NoranProtocolDecoder(null);
+ var decoder = inject(new NoranProtocolDecoder(null));
verifyNull(decoder, binary(
"0d0a2a4b57000d000080010d0a"));
diff --git a/src/test/java/org/traccar/protocol/NvsFrameDecoderTest.java b/src/test/java/org/traccar/protocol/NvsFrameDecoderTest.java
index 76c7cafb9..dd5e1d9b9 100644
--- a/src/test/java/org/traccar/protocol/NvsFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NvsFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class NvsFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NvsFrameDecoder();
+ var decoder = inject(new NvsFrameDecoder());
assertEquals(
binary("0012333537303430303630303137383234312e38"),
diff --git a/src/test/java/org/traccar/protocol/NvsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NvsProtocolDecoderTest.java
index ed4008d47..61d050679 100644
--- a/src/test/java/org/traccar/protocol/NvsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NvsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NvsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NvsProtocolDecoder(null);
+ var decoder = inject(new NvsProtocolDecoder(null));
verifyNull(decoder, binary(
"0012333537303430303630303137383234312e38"));
diff --git a/src/test/java/org/traccar/protocol/NyitechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/NyitechProtocolDecoderTest.java
index 81de06f89..b3bd9aca7 100644
--- a/src/test/java/org/traccar/protocol/NyitechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/NyitechProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class NyitechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new NyitechProtocolDecoder(null);
+ var decoder = inject(new NyitechProtocolDecoder(null));
verifyPosition(decoder, binary(
"4040690030313436383230303238373201201c0c12031a308080801c0c12031a3007d67e7e08aceb841002000000ae08000000000000000000000000001e002900f0ffdd002700f2ffe0002700f2ffe1002400f0ffdf002400f3ffe3008a00ffff01010000a9c70d0a"));
diff --git a/src/test/java/org/traccar/protocol/ObdDongleProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ObdDongleProtocolDecoderTest.java
index 08ebf9995..8272fe41e 100644
--- a/src/test/java/org/traccar/protocol/ObdDongleProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ObdDongleProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ObdDongleProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ObdDongleProtocolDecoder(null);
+ var decoder = inject(new ObdDongleProtocolDecoder(null));
verifyNull(decoder, binary(
"55550003383634383637303232353131303135010009010011023402010201ABAAAA"));
diff --git a/src/test/java/org/traccar/protocol/OigoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OigoProtocolDecoderTest.java
index 023158f21..6015f1d18 100644
--- a/src/test/java/org/traccar/protocol/OigoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OigoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OigoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OigoProtocolDecoder(null);
+ var decoder = inject(new OigoProtocolDecoder(null));
verifyPosition(decoder, binary(
"7e002e000000146310002523830400001bfb000369150f310c0591594d062ac0c0141508011303cd63101604fd00000000"));
diff --git a/src/test/java/org/traccar/protocol/OkoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OkoProtocolDecoderTest.java
index 0df537642..19c96ed9a 100644
--- a/src/test/java/org/traccar/protocol/OkoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OkoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OkoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OkoProtocolDecoder(null);
+ var decoder = inject(new OkoProtocolDecoder(null));
verifyPosition(decoder, text(
"{861001001012919,090745,A,4944.302,N,02353.366,E,0.0,225,251120,7,0.27,F9,11.3,1}"));
diff --git a/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java b/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java
index c8bbf399a..8e8d9b1cf 100644
--- a/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OmnicommFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class OmnicommFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OmnicommFrameDecoder();
+ var decoder = inject(new OmnicommFrameDecoder());
verifyFrame(
binary("c08600004566"),
diff --git a/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java
index 76b476fc2..5b3b08194 100644
--- a/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OmnicommProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OmnicommProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OmnicommProtocolDecoder(null);
+ var decoder = inject(new OmnicommProtocolDecoder(null));
verifyNull(decoder, binary(
"c080080061a61915340100001dec"));
diff --git a/src/test/java/org/traccar/protocol/OpenGtsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OpenGtsProtocolDecoderTest.java
index 9fbd79cbf..5494301d8 100644
--- a/src/test/java/org/traccar/protocol/OpenGtsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OpenGtsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OpenGtsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OpenGtsProtocolDecoder(null);
+ var decoder = inject(new OpenGtsProtocolDecoder(null));
verifyPosition(decoder, request(
"/?id=999000000000003&gprmc=$GPRMC,082202.0,A,5006.747329,N,01416.512315,E,0.0,,131018,1.2,E,A*2E"));
diff --git a/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
index 7d3068c02..408053496 100644
--- a/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OrbcommProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OrbcommProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OrbcommProtocolDecoder(null);
+ var decoder = inject(new OrbcommProtocolDecoder(null));
verifyNull(decoder, response(
buffer("{\"ErrorID\":0,\"NextStartUTC\":\"\",\"Messages\":null}")));
diff --git a/src/test/java/org/traccar/protocol/OrionProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OrionProtocolDecoderTest.java
index 7368a9d4e..f5b98574c 100644
--- a/src/test/java/org/traccar/protocol/OrionProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OrionProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OrionProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OrionProtocolDecoder(null);
+ var decoder = inject(new OrionProtocolDecoder(null));
verifyPositions(decoder, binary(
"5057000137bf6236235a0331b5c6e402a3b5ecff5102980003000e0c1d172936080e0c1d172936b03b01000882050000008e080000000000008c0300940500000084030085030003067600900113150000000000000000000000000000000000000004a4c8"));
diff --git a/src/test/java/org/traccar/protocol/OsmAndProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OsmAndProtocolDecoderTest.java
index a87b45ec4..3b8a94613 100644
--- a/src/test/java/org/traccar/protocol/OsmAndProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OsmAndProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class OsmAndProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OsmAndProtocolDecoder(null);
+ var decoder = inject(new OsmAndProtocolDecoder(null));
verifyNotNull(decoder, request(
"/?id=123456&timestamp=1377177267&cell=257,02,16,2224&cell=257,02,16,2223,-90&wifi=00-14-22-01-23-45,-80&wifi=00-1C-B3-09-85-15,-70"));
diff --git a/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java
index 1194f7970..edb7d1aad 100644
--- a/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OutsafeProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class OutsafeProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OutsafeProtocolDecoder(null);
+ var decoder = inject(new OutsafeProtocolDecoder(null));
verifyPosition(decoder, request(HttpMethod.POST, "/",
buffer("{\"device\":\"865303040103725\",\"owner\":\"\",\"data\":{\"cmd\":\"\",\"ms1\":-1,\"ms2\":-1,\"ms3\":0,\"ms4\":0,\"observation\":\"\",\"content\":null},\"time\":1589277568,\"origin\":\"mqgatte\",\"latitude\":19.346855,\"longitude\":-99.29587,\"altitude\":2757,\"heading\":0,\"rssi\":0}")));
diff --git a/src/test/java/org/traccar/protocol/OwnTracksProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/OwnTracksProtocolDecoderTest.java
index 55b48fb05..03332e7fe 100644
--- a/src/test/java/org/traccar/protocol/OwnTracksProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/OwnTracksProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class OwnTracksProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new OwnTracksProtocolDecoder(null);
+ var decoder = inject(new OwnTracksProtocolDecoder(null));
verifyPosition(decoder, request(HttpMethod.POST, "/",
buffer("{\"_type\":\"location\",\"acc\":15,\"alt\":440,\"batt\":46,\"conn\":\"w\",\"lat\":46.0681247,\"lon\":11.1512805,\"t\":\"u\",\"tid\":\"5t\",\"tst\":1551874878,\"vac\":2,\"vel\":0}")));
diff --git a/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
index edf508314..bde464162 100644
--- a/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PacificTrackProtocolDecoderTest.java
@@ -22,7 +22,7 @@ public class PacificTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PacificTrackProtocolDecoder(null);
+ var decoder = inject(new PacificTrackProtocolDecoder(null));
verifyAttributes(decoder, binary(
"FB80019702808835275309000091108181B2C08F0143000E10000000010000001400010192DF0143288063810A8202835584D285B486E68780882D89C38A788BCE8C3A8D3C8E418F809073A008ACA16600A225A0C0000F4240C10003DF2CC200004E20C3004428C0C4000008C6C5000316A4E011314334424A57464758444C35333137373302A086AB569DFE110E02A8811203FF81000190820100"));
diff --git a/src/test/java/org/traccar/protocol/PathAwayProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PathAwayProtocolDecoderTest.java
index e4c9bf449..97020343f 100644
--- a/src/test/java/org/traccar/protocol/PathAwayProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PathAwayProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class PathAwayProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PathAwayProtocolDecoder(null);
+ var decoder = inject(new PathAwayProtocolDecoder(null));
verifyPosition(decoder, request(
"?UserName=name&Password=pass&LOC=$PWS,1,\"Roger\",,,100107,122846,45.317270,-79.642219,45.00,42,1,\"Comment\",0*58"));
diff --git a/src/test/java/org/traccar/protocol/PiligrimProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PiligrimProtocolDecoderTest.java
index b39060420..475ac0125 100644
--- a/src/test/java/org/traccar/protocol/PiligrimProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PiligrimProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class PiligrimProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PiligrimProtocolDecoder(null);
+ var decoder = inject(new PiligrimProtocolDecoder(null));
verifyPositions(decoder, request(HttpMethod.POST,
"/bingps?imei=868204005544720&csq=18&vout=00&vin=4050&dataid=00000000",
diff --git a/src/test/java/org/traccar/protocol/PluginProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PluginProtocolDecoderTest.java
index 2d134d967..8b15d70a6 100644
--- a/src/test/java/org/traccar/protocol/PluginProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PluginProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class PluginProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PluginProtocolDecoder(null);
+ var decoder = inject(new PluginProtocolDecoder(null));
verifyPosition(decoder, text(
"$$STATUS,000000900005,20210521111252,27.171105,-25.600934,62.0,323,0,-1,2,0.000,2147489155,0.00,0,0,0.0,0.0,0,0,0,0,0,0,0,0,0"));
diff --git a/src/test/java/org/traccar/protocol/PolteProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PolteProtocolDecoderTest.java
index 592267b9e..8bf109d11 100644
--- a/src/test/java/org/traccar/protocol/PolteProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PolteProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class PolteProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PolteProtocolDecoder(null);
+ var decoder = inject(new PolteProtocolDecoder(null));
verifyPosition(decoder, request(HttpMethod.POST, "/",
buffer("{\"_id\":\"5f75cf7b02c5023bfc0beaf7\",\"location\":{\"LocationMetrics\":{\"EnvironmentDensity\":1,\"LocationType\":2,\"carrierInfo\":{\"aux\":{\"PLMN\":\"310410\",\"country\":\"United States\",\"name\":\"ATT Wireless Inc\"},\"crs\":{\"PLMN\":\"310410\",\"country\":\"United States\",\"name\":\"ATT Wireless Inc\"}},\"hdop\":1850000,\"leversion\":\"2.2.18-20200729T140651\",\"towercount\":1},\"altitude\":0.0011297669261693954,\"confidence\":783.7972188868215,\"detected_at\":1601556342,\"latitude\":29.77368956725161,\"longitude\":-98.26530342694024,\"towerDB\":\"default\",\"ueToken\":\"ALT12503DE04336CB2E3A4A113FCDE05DF05A6F\",\"uid\":\"WZuDMv5Je\"},\"report\":{\"battery\":{\"count\":555,\"level\":100,\"voltage\":3.52},\"event\":3,\"time\":\"2020-10-01T12:45:48.207Z\"},\"time\":\"2020-10-01T12:45:42Z\",\"ueToken\":\"ALT12503DE04336CB2E3A4A113FCDE05DF05A6F\",\"uid\":\"WZuDMv5Je\"}")));
diff --git a/src/test/java/org/traccar/protocol/PortmanProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PortmanProtocolDecoderTest.java
index 37798d960..8bc16d373 100644
--- a/src/test/java/org/traccar/protocol/PortmanProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PortmanProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class PortmanProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PortmanProtocolDecoder(null);
+ var decoder = inject(new PortmanProtocolDecoder(null));
verifyPosition(decoder, text(
"$EXT,P0RTMANGRANT,A,210609201710,N0951.6879W08357.0129,0,0,NA,NA,11,25,174700.25,NA,01820000,108"));
diff --git a/src/test/java/org/traccar/protocol/PretraceProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PretraceProtocolDecoderTest.java
index 8a4f257f5..5dbde7846 100644
--- a/src/test/java/org/traccar/protocol/PretraceProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PretraceProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class PretraceProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PretraceProtocolDecoder(null);
+ var decoder = inject(new PretraceProtocolDecoder(null));
verifyPosition(decoder, text(
"(867967021915915U1110A1701201500102238.1700N11401.9324E000264000000000009001790000000,&P11A4,F1050^47"));
diff --git a/src/test/java/org/traccar/protocol/PricolProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PricolProtocolDecoderTest.java
index a9373e22e..8c2081641 100644
--- a/src/test/java/org/traccar/protocol/PricolProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PricolProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class PricolProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PricolProtocolDecoder(null);
+ var decoder = inject(new PricolProtocolDecoder(null));
verifyPosition(decoder, binary(
"3c5052493030303350020000011402110b222b0455152e4e001de819ca450000000000000003820249000000000000000000000000000000000000000040003e"));
diff --git a/src/test/java/org/traccar/protocol/ProgressProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ProgressProtocolDecoderTest.java
index 6e59f2876..9129a3079 100644
--- a/src/test/java/org/traccar/protocol/ProgressProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ProgressProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ProgressProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ProgressProtocolDecoder(null);
+ var decoder = inject(new ProgressProtocolDecoder(null));
verifyNull(decoder, binary(
"020037000100000003003131310f003335343836383035313339303036320f00323530303136333832383531353535010000000100000000000000e6bb97b6"));
diff --git a/src/test/java/org/traccar/protocol/PstFrameDecoderTest.java b/src/test/java/org/traccar/protocol/PstFrameDecoderTest.java
index 96993b97b..172d85df6 100644
--- a/src/test/java/org/traccar/protocol/PstFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PstFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class PstFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PstFrameDecoder();
+ var decoder = inject(new PstFrameDecoder());
verifyFrame(
binary("2fafac5a050f0000e0022fafac5a01891e882bbfdd06dd577c9865620a0efe524c419f940b6710f5ba0c86e5868ffc97c77eaaf166a31dba63f9894e98a91b9486c94e79ce537359737a5e9385431a590eb20b5115a2b7939e4e66ae"),
diff --git a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
index 445c333c1..880caf727 100644
--- a/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/PstProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class PstProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new PstProtocolDecoder(null);
+ var decoder = inject(new PstProtocolDecoder(null));
verifyPosition(decoder, binary(
"2faf97de06000024db0551380cbb08070b040000015a0c09b50177e5100a1822da0d010d0f0451380628101451380cc384b800488a84036901b202d3010001061103ffff00150203523687"));
diff --git a/src/test/java/org/traccar/protocol/Pt215ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Pt215ProtocolDecoderTest.java
index 24cfd316a..a5f5d7e77 100644
--- a/src/test/java/org/traccar/protocol/Pt215ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Pt215ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Pt215ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Pt215ProtocolDecoder(null);
+ var decoder = inject(new Pt215ProtocolDecoder(null));
verifyNull(decoder, binary(
"58580d010359339075435451010d0a"));
diff --git a/src/test/java/org/traccar/protocol/Pt3000ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
index 44f57601c..f7b278139 100644
--- a/src/test/java/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Pt3000ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Pt3000ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Pt3000ProtocolDecoder(null);
+ var decoder = inject(new Pt3000ProtocolDecoder(null));
verifyPosition(decoder, text(
"%356939010012099,$GPRMC,124945.752,A,4436.6245,N,01054.4634,E,0.11,358.52,060408,,,A,+393334347445,N028d"),
diff --git a/src/test/java/org/traccar/protocol/Pt502FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Pt502FrameDecoderTest.java
index 2559ad145..854c789b8 100644
--- a/src/test/java/org/traccar/protocol/Pt502FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Pt502FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Pt502FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Pt502FrameDecoder();
+ var decoder = inject(new Pt502FrameDecoder());
verifyFrame(
binary("24504844302c3936302cffd8ffdb008400140e0f120f0d14121012171514181e32211e1c1c1e3d2c2e243249404c4b47404645505a736250556d5645466488656d777b8182814e608d978c7d96737e817c011517171e1a1e3b21213b7c5346537c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7cffc000110800f0014003012100021101031101ffdd0004000affc401a20000010501010101010100000000000000000102030405060708090a0b100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9fa0100030101010101010101010000000000000102030405060708090a0b1100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00e5292800ef450020a2800a2801d49400b450014b40052e2800a69340094a05007fffd0e5d14b10055b51b00c76a00527273494005250014500251400525001450015347c25003a928010d25007ffd1e52909a00290d0014b40052d0014500145002e297b50018a280109a6d002d2e2803fffd2e7a04da3777a94fbd0025140052500145002514005250014940054e381400b494008690d007fffd3e4f345001486800a5a005a2800a2801680280168a002909e280100cd028016a48937bfb5007fffd4c5038a42280128a004a280128a003ad2500251400945002a8cb0a9a80133450026692803ffd5e4e8a004a2801694500145002d18a005c5140052e280109a69a0029680140abb147b139eb401ffd6c62290d00251400949400114940052500252d002525003e31c93525002521a004a4a00ffd7e4a8a00281400a29d40094b40053ba500252d0018a31400d3cd250018cd2d005ab58777ccdd074ab645007ffd0c72290d00348a2801280"),
diff --git a/src/test/java/org/traccar/protocol/Pt502ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Pt502ProtocolDecoderTest.java
index a68471c95..f310b2227 100644
--- a/src/test/java/org/traccar/protocol/Pt502ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Pt502ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Pt502ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Pt502ProtocolDecoder(null);
+ var decoder = inject(new Pt502ProtocolDecoder(null));
verifyNull(decoder, binary(
"24504844302c3936302cffd8ffdb008400140e0f120f0d14121012171514181e32211e1c1c1e3d2c2e243249404c4b47404645505a736250556d5645466488656d777b8182814e608d978c7d96737e817c011517171e1a1e3b21213b7c5346537c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7c7cffc000110800f0014003012100021101031101ffdd0004000affc401a20000010501010101010100000000000000000102030405060708090a0b100002010303020403050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f02433627282090a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a737475767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9fa0100030101010101010101010000000000000102030405060708090a0b1100020102040403040705040400010277000102031104052131061241510761711322328108144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a535455565758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00e5292800ef450020a2800a2801d49400b450014b40052e2800a69340094a05007fffd0e5d14b10055b51b00c76a00527273494005250014500251400525001450015347c25003a928010d25007ffd1e52909a00290d0014b40052d0014500145002e297b50018a280109a6d002d2e2803fffd2e7a04da3777a94fbd0025140052500145002514005250014940054e381400b494008690d007fffd3e4f345001486800a5a005a2800a2801680280168a002909e280100cd028016a48937bfb5007fffd4c5038a42280128a004a280128a003ad2500251400945002a8cb0a9a80133450026692803ffd5e4e8a004a2801694500145002d18a005c5140052e280109a69a0029680140abb147b139eb401ffd6c62290d00251400949400114940052500252d002525003e31c93525002521a004a4a00ffd7e4a8a00281400a29d40094b40053ba500252d0018a31400d3cd250018cd2d005ab58777ccdd074ab645007ffd0c72290d00348a2801280"));
diff --git a/src/test/java/org/traccar/protocol/Pt60ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Pt60ProtocolDecoderTest.java
index ad987240c..b198ac28e 100644
--- a/src/test/java/org/traccar/protocol/Pt60ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Pt60ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Pt60ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Pt60ProtocolDecoder(null);
+ var decoder = inject(new Pt60ProtocolDecoder(null));
verifyNull(decoder, text(
"@B#@|01|006|864891030184954|9425010450971470|20181213093127|2|1|"));
diff --git a/src/test/java/org/traccar/protocol/R12wProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/R12wProtocolDecoderTest.java
index acb7277b5..a363022f0 100644
--- a/src/test/java/org/traccar/protocol/R12wProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/R12wProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class R12wProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new R12wProtocolDecoder(null);
+ var decoder = inject(new R12wProtocolDecoder(null));
verifyNull(decoder, text(
"$HX,0001,860721009104316,e92c,933402042499509,55792760080,12345678,01,a8d940a9,#,50,"));
diff --git a/src/test/java/org/traccar/protocol/RaceDynamicsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RaceDynamicsProtocolDecoderTest.java
index 22902079a..ff40c19a3 100644
--- a/src/test/java/org/traccar/protocol/RaceDynamicsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RaceDynamicsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RaceDynamicsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RaceDynamicsProtocolDecoder(null);
+ var decoder = inject(new RaceDynamicsProtocolDecoder(null));
verifyNull(decoder, text(
"$GPRMC,12,260819,100708,862549040661129,"));
diff --git a/src/test/java/org/traccar/protocol/RadarProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RadarProtocolDecoderTest.java
index be1e4de0b..b5a2555b1 100644
--- a/src/test/java/org/traccar/protocol/RadarProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RadarProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RadarProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RadarProtocolDecoder(null);
+ var decoder = inject(new RadarProtocolDecoder(null));
verifyPositions(decoder, binary(
"361800011459015cb497554c01c101ff003500050038000207ff831c04c01f1c00555cb464895cb46487ff7f04eafeffdbd80000079402ead0000000110000000000120d2aff150000000000000002000a00050002436c61726f0000000000008b00000003764500037653005207ff831c04c01f1c00555cb4648a5cb46489ff7f04eafeffdbd80000079402ead0000000010000000000120e00ff150000000000000002000800060002436c61726f0000000000008d00000003764600037654000207ff831c04c01f1c00555cb464d85cb464d7ff7f04eafeffdbd80000079402ead0000000110000000000120e2aff150000000000000002000700070003436c61726f0000000000008d000000037694000376a2005207ff831c04c01f1c00555cb464d95cb464d9ff7f04eafeffdbd80000079402eac0000000010000000000120e00ff150000000000000002000700070003436c61726f0000000000008d000000037695000376a3000207ff831c04c01f1c00555cb465065cb46504ff7f04eafeffdbd80000079402ead0000000110000000000120e2aff150000000000000000000500060005436c61726f0000000000008d0000000376c2000376d07ed7"));
diff --git a/src/test/java/org/traccar/protocol/RaveonProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RaveonProtocolDecoderTest.java
index 1b111ee5d..3da671dbf 100644
--- a/src/test/java/org/traccar/protocol/RaveonProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RaveonProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RaveonProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RaveonProtocolDecoder(null);
+ var decoder = inject(new RaveonProtocolDecoder(null));
verifyPosition(decoder, text(
"$PRAVE,0001,0001,3308.9051,-11713.1164,195348,1,10,168,31,13.3,3,-83,0,0,,1003.4*66"));
diff --git a/src/test/java/org/traccar/protocol/RecodaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RecodaProtocolDecoderTest.java
index 803cfb48a..5bdfd6816 100644
--- a/src/test/java/org/traccar/protocol/RecodaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RecodaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RecodaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RecodaProtocolDecoder(null);
+ var decoder = inject(new RecodaProtocolDecoder(null));
verifyNull(decoder, binary(
"01100020480000000300000030393535360000000000000001000000303030303000000000000000000000000000000000000000006100004531313037353500ffffffffffff0000"));
diff --git a/src/test/java/org/traccar/protocol/RetranslatorProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RetranslatorProtocolDecoderTest.java
index 4af77cfbf..eb591a5f6 100644
--- a/src/test/java/org/traccar/protocol/RetranslatorProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RetranslatorProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RetranslatorProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RetranslatorProtocolDecoder(null);
+ var decoder = inject(new RetranslatorProtocolDecoder(null));
verifyPosition(decoder, binary(
"74000000333533393736303133343435343835004B0BFB70000000030BBB000000270102706F73696E666F00A027AFDF5D9848403AC7253383DD4B400000000000805A40003601460B0BBB0000001200047077725F657874002B8716D9CE973B400BBB00000011010361766C5F696E707574730000000001"));
diff --git a/src/test/java/org/traccar/protocol/RitiProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RitiProtocolDecoderTest.java
index e0890a5fc..0d7eeb0df 100644
--- a/src/test/java/org/traccar/protocol/RitiProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RitiProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RitiProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RitiProtocolDecoder(null);
+ var decoder = inject(new RitiProtocolDecoder(null));
verifyPosition(decoder, binary(
"3b28a2a2056315316d4000008100000000000000005f710000244750524d432c3138303535332e3030302c412c353532342e383437312c4e2c30313133342e313837382c452c302e30302c2c3032313231332c2c2c412a37340d0a00000000000000000000000000000000040404"));
diff --git a/src/test/java/org/traccar/protocol/RoboTrackFrameDecoderTest.java b/src/test/java/org/traccar/protocol/RoboTrackFrameDecoderTest.java
index eaf83458d..e4b30538c 100644
--- a/src/test/java/org/traccar/protocol/RoboTrackFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RoboTrackFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class RoboTrackFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RoboTrackFrameDecoder();
+ var decoder = inject(new RoboTrackFrameDecoder());
verifyFrame(
binary("00524f424f545241434b00000000000000383638323034303032323533343136313233343536373839303132312e313261000000312e353761000000312e3030000000003e"),
diff --git a/src/test/java/org/traccar/protocol/RoboTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RoboTrackProtocolDecoderTest.java
index 40218efdb..db1617c9e 100644
--- a/src/test/java/org/traccar/protocol/RoboTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RoboTrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RoboTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RoboTrackProtocolDecoder(null);
+ var decoder = inject(new RoboTrackProtocolDecoder(null));
verifyNull(decoder, binary(
"00524f424f545241434b00000000000000383638323034303032323533343136313233343536373839303132312e313261000000312e353761000000312e3030000000003e"));
diff --git a/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java
index 71313e449..b301507fb 100644
--- a/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RstProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class RstProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RstProtocolDecoder(null);
+ var decoder = inject(new RstProtocolDecoder(null));
verifyNull(decoder, text(
"RST;A;RST-MINIv2;V7.04;008051261;124;29;04-04-2021 17:27:26;04-04-2021 17:27:26;-1.280811;-47.931755;7353;79;1;14;7315;26;10;0;1855;0;0;0;0;5;5;-1.280821;-47.931747;04-04-2021 17:52:23;6;-1.280863;-47.931770;04-04-2021 18:12:19;5;-1.280844;-47.931763;04-04-2021 17:28:02;5;-1.280900;-47.931770;04-04-2021 19:04:27;4;-1.280843;-47.931747;04-04-2021 18:21:45;04-04-2021 19:29:59;04-04-2021 19:29:59;-1.280770;-47.931595;1;15;0;0;0;0;FIM;"));
diff --git a/src/test/java/org/traccar/protocol/RuptelaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/RuptelaProtocolDecoderTest.java
index eca7518a7..89d4a02cc 100644
--- a/src/test/java/org/traccar/protocol/RuptelaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/RuptelaProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class RuptelaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new RuptelaProtocolDecoder(null);
+ var decoder = inject(new RuptelaProtocolDecoder(null));
verifyNull(decoder, binary(
"002e000316d53d58d6020f4573303430302e30332e36382e30340000c2b3090d0e950000827b000003e80000003c003c1681"));
diff --git a/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java
index ec795c9eb..2b7f40c82 100644
--- a/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/S168ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class S168ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new S168ProtocolDecoder(null);
+ var decoder = inject(new S168ProtocolDecoder(null));
verifyAttributes(decoder, text(
"S168#861118010104168#00ec#0016#SYNC:0093;STATUS:91,51"));
diff --git a/src/test/java/org/traccar/protocol/SabertekFrameDecoderTest.java b/src/test/java/org/traccar/protocol/SabertekFrameDecoderTest.java
index ced40acd0..15b1d0451 100644
--- a/src/test/java/org/traccar/protocol/SabertekFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SabertekFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class SabertekFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SabertekFrameDecoder();
+ var decoder = inject(new SabertekFrameDecoder());
assertEquals(
binary("2c3939393939393939392c332c34302c36352c372c302c312c2d32352e3738313636362c32382e3235343730322c34302c3236382c313431342c382c35353632332c"),
diff --git a/src/test/java/org/traccar/protocol/SabertekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SabertekProtocolDecoderTest.java
index 148695dcd..6aafa325f 100644
--- a/src/test/java/org/traccar/protocol/SabertekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SabertekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SabertekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SabertekProtocolDecoder(null);
+ var decoder = inject(new SabertekProtocolDecoder(null));
verifyPosition(decoder, text(
",999999999,3,40,65,7,0,1,-25.781666,28.254702,40,268,1414,8,55623,"));
diff --git a/src/test/java/org/traccar/protocol/SanavProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SanavProtocolDecoderTest.java
index 223f4f12f..d0ae6fabf 100644
--- a/src/test/java/org/traccar/protocol/SanavProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SanavProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SanavProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SanavProtocolDecoder(null);
+ var decoder = inject(new SanavProtocolDecoder(null));
verifyPosition(decoder, text(
"imei=353197040023431&rmc=$GPRMC,015258.000,A,2457.8101,N,12125.5393,E,0.00,0.00,210111,,*18,AUTO,0300,2.1,10,466,97,34E7,3391,74,466,9 7,3F2D,3391,65,466,97,39C9,3391,79,466,97,3F2C,3391,81,466,97,0000,00 00,83,466,97,0000,0000,85,466,97,0000,0000,85,1,24"));
diff --git a/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
index 23bd6d80b..57398dd84 100644
--- a/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SanulProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SanulProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SanulProtocolDecoder(null);
+ var decoder = inject(new SanulProtocolDecoder(null));
verifyNull(decoder, binary(
"aa007020000100000000000033353333353830313831353431313700000000000000000000"));
diff --git a/src/test/java/org/traccar/protocol/SatsolProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SatsolProtocolDecoderTest.java
index dcd51063c..0fe16377d 100644
--- a/src/test/java/org/traccar/protocol/SatsolProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SatsolProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SatsolProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SatsolProtocolDecoder(null);
+ var decoder = inject(new SatsolProtocolDecoder(null));
verifyPositions(decoder, binary(
"f0e1bf4cb2ec1600e1005f8791e901000000c959515c2cc24a03aeadcd010e01a800250001090201878e92e901000000cb59515c2dc24a03b8adcd018801a8001d0001080201325993e901000000cc59515c2fc24a03bfadcd01ab01a800220001080201dd8194e901000000cd59515c32c24a03ceadcd015801a8002500010802015f3795e905000900ce59515c32c24a03d8adcd01f600a700250001091401000000000000000000863496e901000000cf59515c34c24a03ddadcd019b00a700280001090201714197e904000600cf59515c34c24a03ddadcd019b00a7002800010a1401becd07001901"));
diff --git a/src/test/java/org/traccar/protocol/SigfoxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SigfoxProtocolDecoderTest.java
index 7e2812714..66d5f5e69 100644
--- a/src/test/java/org/traccar/protocol/SigfoxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SigfoxProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class SigfoxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SigfoxProtocolDecoder(null);
+ var decoder = inject(new SigfoxProtocolDecoder(null));
verifyPosition(decoder, request(HttpMethod.POST, "/",
buffer("{ \"device\":\"BFE47E\", \"time\":1590497040, \"data\":\"10297eb01e621122070000be\", \"seqNumber\":8, \"deviceTypeId\":\"5ecb8bfac563d620cc9e6798\", \"ack\":false }")));
diff --git a/src/test/java/org/traccar/protocol/SiwiProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SiwiProtocolDecoderTest.java
index d264895fc..0d7eb4f16 100644
--- a/src/test/java/org/traccar/protocol/SiwiProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SiwiProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SiwiProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SiwiProtocolDecoder(null);
+ var decoder = inject(new SiwiProtocolDecoder(null));
verifyPosition(decoder, text(
"$SIWI,868957040831465,44,E,,,1,1,1,16.79,0,0,5,A,17.204447,78.355087,534,44,140955,180221,11,1,15,5,4322,0,0,0,0,0,0,1.0,1.6CPTASF_6.60,0!"));
diff --git a/src/test/java/org/traccar/protocol/SkypatrolProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
index a248056f8..e59e3c3f0 100644
--- a/src/test/java/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SkypatrolProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SkypatrolProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SkypatrolProtocolDecoder(null);
+ var decoder = inject(new SkypatrolProtocolDecoder(null));
verifyNull(decoder, binary(
"000a02171101303131373232303031333537393833060200000006202020202020202020312020202020202030313137323230303133353739383320"));
diff --git a/src/test/java/org/traccar/protocol/SmartSoleProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SmartSoleProtocolDecoderTest.java
index 740d1b62c..258eb0fce 100644
--- a/src/test/java/org/traccar/protocol/SmartSoleProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SmartSoleProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SmartSoleProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SmartSoleProtocolDecoder(null);
+ var decoder = inject(new SmartSoleProtocolDecoder(null));
verifyPosition(decoder, text(
"#GTXRP=359366080000385,8,180514200051,34.041981,-118.255806,60,1,1,7,1.80,180514200051,4.16,11"));
diff --git a/src/test/java/org/traccar/protocol/SmokeyProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SmokeyProtocolDecoderTest.java
index d806fd790..de025c18e 100644
--- a/src/test/java/org/traccar/protocol/SmokeyProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SmokeyProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SmokeyProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SmokeyProtocolDecoder(null);
+ var decoder = inject(new SmokeyProtocolDecoder(null));
verifyAttributes(decoder, binary(
"534d0300865101019383025f0403000000000b86250200000c0000028f000102f8cc0900127f08"));
diff --git a/src/test/java/org/traccar/protocol/SolarPoweredProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SolarPoweredProtocolDecoderTest.java
index 7202aaefb..445628f6d 100644
--- a/src/test/java/org/traccar/protocol/SolarPoweredProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SolarPoweredProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class SolarPoweredProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SolarPoweredProtocolDecoder(null);
+ var decoder = inject(new SolarPoweredProtocolDecoder(null));
verifyAttribute(decoder, binary(
"7e850256553309440011003e81131914030600332301a61ed709209ff40014b89082020f0283100000f908000000440000003d1f19021784114161726f6e34475630312d323030333031057e"),
diff --git a/src/test/java/org/traccar/protocol/SpotProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SpotProtocolDecoderTest.java
index 7f8e2b58f..03d0e97f0 100644
--- a/src/test/java/org/traccar/protocol/SpotProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SpotProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class SpotProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SpotProtocolDecoder(null);
+ var decoder = inject(new SpotProtocolDecoder(null));
verifyPositions(decoder, request(HttpMethod.POST, "/", buffer(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n",
diff --git a/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java
index 1710ccbb9..0a6ad0163 100644
--- a/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/StarLinkProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class StarLinkProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new StarLinkProtocolDecoder(null);
+ var decoder = inject(new StarLinkProtocolDecoder(null));
decoder.setFormat("#IMEI#,#EDT#,#PDT#,#LAT#,#LONG#,#SPD#,#IGN#,#ODO#,#DUR#,#TDUR#,#LAC#,#CID#,#VIN#,#VBAT#,#EID#,#EDSC#,#DRV#,#SATU#,#CSS#,#OUT1#,#OUT2#,#CFL#");
diff --git a/src/test/java/org/traccar/protocol/StarcomProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/StarcomProtocolDecoderTest.java
index 851d4eac6..84c470970 100644
--- a/src/test/java/org/traccar/protocol/StarcomProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/StarcomProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class StarcomProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new StarcomProtocolDecoder(null);
+ var decoder = inject(new StarcomProtocolDecoder(null));
verifyPosition(decoder, text(
"|unit=416307,unittype=5,address=186.167.243.28,kind=14,software_version=14.02.18,hardware_type=17,gps_type=6,longitude=-67.85891,latitude=10.21988,datetime_actual=2019/05/07 21:59:38,network=TCPIP.1|\r\n"));
diff --git a/src/test/java/org/traccar/protocol/StartekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/StartekProtocolDecoderTest.java
index cea079156..e8eecae96 100644
--- a/src/test/java/org/traccar/protocol/StartekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/StartekProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class StartekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new StartekProtocolDecoder(null);
+ var decoder = inject(new StartekProtocolDecoder(null));
verifyAttribute(decoder, text(
"&&R187,860294046453690,000,0,,220105160656,A,22.994986,72.499711,15,0.9,2,222,55,121135784,404|98|147B|0000376A,24,0000001F,02,00,052E|01A3|0000|0000,1,010000|020000,,853|6|10|105|73|41|125|34|52"),
diff --git a/src/test/java/org/traccar/protocol/StbProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/StbProtocolDecoderTest.java
index 74b30f9eb..c618ac21c 100644
--- a/src/test/java/org/traccar/protocol/StbProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/StbProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class StbProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new StbProtocolDecoder(null);
+ var decoder = inject(new StbProtocolDecoder(null));
verifyAttributes(decoder, text(
"{\"attrList\":[{\"id\":\"02101001\",\"value\":\"510101051161205774\"},{\"id\":\"02105001\",\"value\":\"-61\"},{\"id\":\"02102001\",\"value\":\"1\"},{\"doorId\":\"1\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"1\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"1\",\"id\":\"02103001\",\"value\":\"0\"},{\"doorId\":\"1\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"2\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"2\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"2\",\"id\":\"02103001\",\"value\":\"0\"},{\"doorId\":\"2\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"3\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"3\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"3\",\"id\":\"02103001\",\"value\":\"0\"},{\"doorId\":\"3\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"4\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"4\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"4\",\"id\":\"02103001\",\"value\":\"0\"},{\"doorId\":\"4\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"5\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"5\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"5\",\"id\":\"02103001\",\"value\":\"1\"},{\"doorId\":\"5\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"6\",\"id\":\"02104001\",\"value\":\"2\"},{\"doorId\":\"6\",\"id\":\"02106001\",\"value\":\"BT106002320JPZZ210718002\"},{\"doorId\":\"6\",\"id\":\"02109001\",\"value\":\"98\"},{\"doorId\":\"6\",\"id\":\"02110001\",\"value\":\"100\"},{\"doorId\":\"6\",\"id\":\"01118001\",\"value\":\"27\"},{\"doorId\":\"6\",\"id\":\"01119001\",\"value\":\"26\"},{\"doorId\":\"6\",\"id\":\"01120001\",\"value\":\"28\"},{\"doorId\":\"6\",\"id\":\"02114001\",\"value\":\"0\"},{\"doorId\":\"6\",\"id\":\"02116001\",\"value\":\"0\"},{\"doorId\":\"6\",\"id\":\"02117001\",\"value\":\"0\"},{\"doorId\":\"6\",\"id\":\"01121001\",\"value\":\"2\"},{\"doorId\":\"6\",\"id\":\"02130001\",\"value\":\"0\"},{\"doorId\":\"6\",\"id\":\"01122001\",\"value\":\"4\"},{\"doorId\":\"6\",\"id\":\"02001001\",\"value\":\"000\"},{\"doorId\":\"6\",\"id\":\"02002001\",\"value\":\"000\"},{\"doorId\":\"6\",\"id\":\"01116001\",\"value\":\"20\"},{\"doorId\":\"6\",\"id\":\"01117001\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117002\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117003\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117004\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117005\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117006\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117007\",\"value\":\"3325\"},{\"doorId\":\"6\",\"id\":\"01117008\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117009\",\"value\":\"3325\"},{\"doorId\":\"6\",\"id\":\"01117010\",\"value\":\"3326\"},{\"doorId\":\"6\",\"id\":\"01117011\",\"value\":\"3326\"},{\"doorId\":\"6\",\"id\":\"01117012\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117013\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117014\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117015\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117016\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117017\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117018\",\"value\":\"3323\"},{\"doorId\":\"6\",\"id\":\"01117019\",\"value\":\"3324\"},{\"doorId\":\"6\",\"id\":\"01117020\",\"value\":\"3323\"},{\"batteryId\":\"BT106002320JPZZ210718002\",\"doorId\":\"6\",\"id\":\"02103001\",\"value\":\"1\"},{\"batteryId\":\"BT106002320JPZZ210718002\",\"doorId\":\"6\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"7\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"7\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"7\",\"id\":\"02103001\",\"value\":\"1\"},{\"doorId\":\"7\",\"id\":\"02118001\",\"value\":\"1\"},{\"doorId\":\"8\",\"id\":\"02104001\",\"value\":\"0\"},{\"doorId\":\"8\",\"id\":\"02106001\",\"value\":\"\"},{\"doorId\":\"8\",\"id\":\"02103001\",\"value\":\"0\"},{\"doorId\":\"8\",\"id\":\"02118001\",\"value\":\"1\"},{\"id\":\"02111001\",\"value\":\"0.0\"},{\"id\":\"02112001\",\"value\":\"0.0\"},{\"id\":\"02107001\",\"value\":\"229.1\"},{\"id\":\"02108001\",\"value\":\"1.005\"},{\"id\":\"02120001\",\"value\":\"143.76\"},{\"id\":\"02113001\",\"value\":\"29\"},{\"id\":\"02119001\",\"value\":\"1\"}],\"devId\":\"CHZD08KPD0210425046\",\"isFull\":1,\"msgType\":310,\"txnNo\":\"1636707944778\"}"));
diff --git a/src/test/java/org/traccar/protocol/Stl060ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Stl060ProtocolDecoderTest.java
index e13f74604..3ef4b1901 100644
--- a/src/test/java/org/traccar/protocol/Stl060ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Stl060ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Stl060ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Stl060ProtocolDecoder(null);
+ var decoder = inject(new Stl060ProtocolDecoder(null));
verifyPosition(decoder, text(
"$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/src/test/java/org/traccar/protocol/SuntechFrameDecoderTest.java b/src/test/java/org/traccar/protocol/SuntechFrameDecoderTest.java
index 99cbeac2f..96fed314c 100644
--- a/src/test/java/org/traccar/protocol/SuntechFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SuntechFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class SuntechFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SuntechFrameDecoder();
+ var decoder = inject(new SuntechFrameDecoder());
verifyFrame(
binary("81004e05200013383fffff3401000301130a0512080400000000000000000000000047f9d5846a06810072225214010100020300a8002604c1000004b000000470000025a100000000000025c4000000a6"),
diff --git a/src/test/java/org/traccar/protocol/SuntechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SuntechProtocolDecoderTest.java
index 098758728..7fed55454 100644
--- a/src/test/java/org/traccar/protocol/SuntechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SuntechProtocolDecoderTest.java
@@ -10,7 +10,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeTemperature() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
decoder.setHbm(true);
decoder.setIncludeAdc(true);
@@ -39,7 +39,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeRpm() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
decoder.setHbm(true);
decoder.setIncludeRpm(true);
@@ -53,7 +53,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeHours() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
decoder.setHbm(true);
@@ -66,7 +66,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeDriver() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
verifyAttribute(decoder, buffer(
"ST300HTE;511050566;45;308;20200909;13:38:38;0;12.50;001354;0.0;1;0;1;1;0;-27.636632;-052.277933;-27.636675;-052.277947;000.000;002.296;0;00000000000000"),
@@ -81,7 +81,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
verifyPosition(decoder, buffer(
"BLE;1140000053;114;1.0.1;20211001;17:27:09;+28.433465;-82.565891;1;-43;-46;-41;ACB89523EF68;247;0;0"));
@@ -262,7 +262,7 @@ public class SuntechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeCrash() throws Exception {
- var decoder = new SuntechProtocolDecoder(null);
+ var decoder = inject(new SuntechProtocolDecoder(null));
verifyAttribute(decoder, binary(
"4352523b303931303030303036333b313b313b303135303b16011c150f0ad82f6c0000000000ae037085fbff7700fd00faff6300f30000006800fb000d007100fa00f32f6c00000000005e044a80fcff6f000301e1ff5d00e900e1ff6400e600f4ff5b00ec000a306c00000000002104248306006c000501fcff5b00e00001006e000101eeff4e00e10022306c00000000005c041a7e00006a00010100005d00f800b5ff7cffdf0050009300fc003b44350d"),
diff --git a/src/test/java/org/traccar/protocol/SupermateProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SupermateProtocolDecoderTest.java
index 29ec670aa..e96c9b62d 100755
--- a/src/test/java/org/traccar/protocol/SupermateProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SupermateProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SupermateProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SupermateProtocolDecoder(null);
+ var decoder = inject(new SupermateProtocolDecoder(null));
verifyPosition(decoder, text(
"2:359672050130411:1:*,00000000,XT,A,10031b,140b28,80ad4c72,81ba2d2c,06ab,238c,020204010000,12,0,0000,0003e6"));
diff --git a/src/test/java/org/traccar/protocol/SviasProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SviasProtocolDecoderTest.java
index 8a3a74753..fb9053706 100644
--- a/src/test/java/org/traccar/protocol/SviasProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SviasProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SviasProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SviasProtocolDecoder(null);
+ var decoder = inject(new SviasProtocolDecoder(null));
verifyPosition(decoder, text(
"[7061,3041,57,20324277,710,40618,141342,-93155840,-371754060,0,20469,0,16,1,0,0,11323,100,9,,32,4695"));
diff --git a/src/test/java/org/traccar/protocol/SwiftechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/SwiftechProtocolDecoderTest.java
index 10b033985..923b7abfb 100644
--- a/src/test/java/org/traccar/protocol/SwiftechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/SwiftechProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class SwiftechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new SwiftechProtocolDecoder(null);
+ var decoder = inject(new SwiftechProtocolDecoder(null));
verifyPosition(decoder, text(
"@@861551041946971,,0,102040,1023.9670,N,07606.8160,E,2.26,151220,A,0127,1,1,03962,00000,#"));
diff --git a/src/test/java/org/traccar/protocol/T55ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/T55ProtocolDecoderTest.java
index ba981598d..6ce47db94 100644
--- a/src/test/java/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class T55ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new T55ProtocolDecoder(null);
+ var decoder = inject(new T55ProtocolDecoder(null));
verifyPosition(decoder, text(
"QZE,868994033976700,35,28062020,113553,22.13673,114.57263,0,22,A,0"));
@@ -121,7 +121,7 @@ public class T55ProtocolDecoderTest extends ProtocolTest {
// Maxon devices can send NMEA before identification
- var decoder = new T55ProtocolDecoder(null);
+ var decoder = inject(new T55ProtocolDecoder(null));
verifyNull(decoder, text(
"$GPRMC,012006,A,4828.10,N,1353.52,E,0.00,0.00,180915,020.3,E*42"));
diff --git a/src/test/java/org/traccar/protocol/T57FrameDecoderTest.java b/src/test/java/org/traccar/protocol/T57FrameDecoderTest.java
index dd5929b04..40d5bc9e9 100644
--- a/src/test/java/org/traccar/protocol/T57FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/T57FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class T57FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new T57FrameDecoder();
+ var decoder = inject(new T57FrameDecoder());
verifyFrame(
binary("2a5435372346312354353731313137303031233330313131372330303038343323323233342e31333033234e2330383832362e313731342345232b302e3234322c2b302e3130392c2d302e37383923302e30303023362e323030303023413223342e3223"),
diff --git a/src/test/java/org/traccar/protocol/T57ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/T57ProtocolDecoderTest.java
index 376aab1da..2e097562b 100644
--- a/src/test/java/org/traccar/protocol/T57ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/T57ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class T57ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new T57ProtocolDecoder(null);
+ var decoder = inject(new T57ProtocolDecoder(null));
verifyPosition(decoder, text(
"*T57#F1#T571117001#301117#000843#2234.1303#N#08826.1714#E#+0.242,+0.109,-0.789#0.000#6.20000#A2#4.2#"));
diff --git a/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
index 1dd4e8619..b5917e3cc 100644
--- a/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class T800xProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new T800xProtocolDecoder(null);
+ var decoder = inject(new T800xProtocolDecoder(null));
verifyAttributes(decoder, binary(
"27271000247bd00860112047066487210407034238000005d7d17365e625ff640a730148"));
diff --git a/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
index 56af8830a..36c9d9148 100644
--- a/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TaipProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class TaipProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TaipProtocolDecoder(null);
+ var decoder = inject(new TaipProtocolDecoder(null));
verifyAttribute(decoder, text(
">RUS00,111220124402-3138067-06417623000012200FF,000000000000000000000000000,0000000111,15640422,00000,+25.5,00000,51;ID=CST3G0443;#IP1:089F;*34<"),
diff --git a/src/test/java/org/traccar/protocol/TechTltProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TechTltProtocolDecoderTest.java
index c5de8e62a..b4617cb61 100644
--- a/src/test/java/org/traccar/protocol/TechTltProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TechTltProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TechTltProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TechTltProtocolDecoder(null);
+ var decoder = inject(new TechTltProtocolDecoder(null));
verifyPosition(decoder, text(
"002422269*POS=Y,16:21:20,25/11/09,3809.8063N,01444.7438E,4.17,117.23,0.4,09,40076,56341\r\n"),
diff --git a/src/test/java/org/traccar/protocol/TechtoCruzFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TechtoCruzFrameDecoderTest.java
index dc4afb784..36c3b578b 100644
--- a/src/test/java/org/traccar/protocol/TechtoCruzFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TechtoCruzFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class TechtoCruzFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TechtoCruzFrameDecoder();
+ var decoder = inject(new TechtoCruzFrameDecoder());
assertEquals(
buffer("$$A35,RESPO|G33|8612345678910|CRUZ,*E3"),
diff --git a/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java
index 4cef682b4..459401469 100644
--- a/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TechtoCruzProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TechtoCruzProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TechtoCruzProtocolDecoder(null);
+ var decoder = inject(new TechtoCruzProtocolDecoder(null));
verifyPosition(decoder, text(
"$$A120,8612345678910,211005105836,A,FLEX,KCB 947C,000.0,0,-1.38047,S,36.93951,E,1648.4,243.140,21,28,12.1,3.7,0,1,0,0,0,*F6"));
diff --git a/src/test/java/org/traccar/protocol/TekFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TekFrameDecoderTest.java
index f315e6432..98b2b80c4 100644
--- a/src/test/java/org/traccar/protocol/TekFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TekFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TekFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TekFrameDecoder();
+ var decoder = inject(new TekFrameDecoder());
verifyFrame(
binary("020315048715E70861074028023219026200400A0340002C007F0009000000000000000000402842064028420641284206402844064128440640284406402844064028440641284406402844060010010C04052B000253000000000001060A0000000000000228330000FF0000FF360014B394"),
diff --git a/src/test/java/org/traccar/protocol/TekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TekProtocolDecoderTest.java
index a371ffe6b..17910a8d6 100644
--- a/src/test/java/org/traccar/protocol/TekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TekProtocolDecoder(null);
+ var decoder = inject(new TekProtocolDecoder(null));
verifyPosition(decoder, binary(
"0501E304E00E76086107502100455111492C33332C3137303935342E302C353235352E393933344E2C30303833322E34333935572C322E312C3133342E382C322C302E30302C302E302C302E302C3234303931352C30362C3C45"));
diff --git a/src/test/java/org/traccar/protocol/TelemaxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TelemaxProtocolDecoderTest.java
index 8c3650f4e..9f36b3f96 100644
--- a/src/test/java/org/traccar/protocol/TelemaxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TelemaxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TelemaxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TelemaxProtocolDecoder(null);
+ var decoder = inject(new TelemaxProtocolDecoder(null));
verifyNull(decoder, text(
"%067374070128"));
diff --git a/src/test/java/org/traccar/protocol/TelicFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TelicFrameDecoderTest.java
index 125b61d48..dc6cc58c6 100644
--- a/src/test/java/org/traccar/protocol/TelicFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TelicFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TelicFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TelicFrameDecoder();
+ var decoder = inject(new TelicFrameDecoder());
verifyFrame(
binary("303032363230333339337c3232367c31307c303032303034303130"),
diff --git a/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java
index 03824d91b..214bb06c7 100644
--- a/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TelicProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TelicProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TelicProtocolDecoder(null);
+ var decoder = inject(new TelicProtocolDecoder(null));
verifyNull(decoder, text(
"0026355565071347499|206|01|001002008"));
diff --git a/src/test/java/org/traccar/protocol/TeltonikaFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TeltonikaFrameDecoderTest.java
index 7787907b6..d5c7fcdb0 100644
--- a/src/test/java/org/traccar/protocol/TeltonikaFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TeltonikaFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TeltonikaFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TeltonikaFrameDecoder();
+ var decoder = inject(new TeltonikaFrameDecoder());
verifyFrame(
binary("000F313233343536373839303132333435"),
diff --git a/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
index c3c32369c..0ae4bbfa4 100644
--- a/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TeltonikaProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class TeltonikaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TeltonikaProtocolDecoder(null, false);
+ var decoder = inject(new TeltonikaProtocolDecoder(null, false));
verifyNull(decoder, binary(
"000F313233343536373839303132333435"));
@@ -127,7 +127,7 @@ public class TeltonikaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodePhoto() throws Exception {
- var decoder = new TeltonikaProtocolDecoder(null, false);
+ var decoder = inject(new TeltonikaProtocolDecoder(null, false));
verifyNull(decoder, binary(
"000F313233343536373839303132333435"));
@@ -147,7 +147,7 @@ public class TeltonikaProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeConnectionless() throws Exception {
- var decoder = new TeltonikaProtocolDecoder(null, true);
+ var decoder = inject(new TeltonikaProtocolDecoder(null, true));
verifyPositions(decoder, false, binary(
"0049cafe0122000f33353734353430373237313339373508010000015d3766f6a800003eef961ec6215e0063006d09003100070401000200f001c8000242381c18003201c7000000e10001"));
diff --git a/src/test/java/org/traccar/protocol/TeraTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TeraTrackProtocolDecoderTest.java
index 6f96f73ad..fc66f53bb 100644
--- a/src/test/java/org/traccar/protocol/TeraTrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TeraTrackProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TeraTrackProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TeraTrackProtocolDecoder(null);
+ var decoder = inject(new TeraTrackProtocolDecoder(null));
verifyAttributes(decoder, text(
"{\"MDeviceID\":\"022043756090\",\"DiviceType\":\"1\",\"DataType\":\"1\",\"DataLength\":\"69\",\"DateTime\":\"2022-03-09 10:56:01\",\"Latitude\":\"-6.846451\",\"Longitude\":\"39.316324\",\"LongitudeState\":\"1\",\"LatitudeState\":\"0\",\"Speed\":\"90\",\"Mileage\":\"0\",\"FenceAlarm\":\"0\",\"AreaAlarmID\":\"0\",\"LockCutOff\":\"0\",\"SealTampered\":\"0\",\"MessageAck\":\"1\",\"LockRope\":\"1\",\"LockStatus\":\"1\",\"LockOpen\":\"0\",\"PasswordError\":\"0\",\"CardNo\":\"60000644\",\"IllegalCard\":\"0\",\"LowPower\":\"0\",\"UnCoverBack\":\"0\",\"CoverStatus\":\"1\",\"LockStuck\":\"0\",\"Power\":\"79\",\"GSM\":\"16\",\"IMEI\":\"860922043756090\",\"Index\":\"20\",\"Slave\":[]}"));
diff --git a/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java
index ff808e667..2085112ec 100644
--- a/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ThinkPowerProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ThinkPowerProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ThinkPowerProtocolDecoder(null);
+ var decoder = inject(new ThinkPowerProtocolDecoder(null));
verifyNull(decoder, binary(
"0103002C01020F38363737333030353038323030343606544C3930344111522D312E302E31372E32303231303431300011C3"));
diff --git a/src/test/java/org/traccar/protocol/ThinkRaceProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/ThinkRaceProtocolDecoderTest.java
index 39e7ed473..859dd4f89 100644
--- a/src/test/java/org/traccar/protocol/ThinkRaceProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/ThinkRaceProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class ThinkRaceProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new ThinkRaceProtocolDecoder(null);
+ var decoder = inject(new ThinkRaceProtocolDecoder(null));
verifyNull(decoder, binary(
"48415349483031343730303134382C8000100134363030303134363139363239343806FF"));
diff --git a/src/test/java/org/traccar/protocol/Tk102ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tk102ProtocolDecoderTest.java
index 2185fda29..3bcc9994a 100644
--- a/src/test/java/org/traccar/protocol/Tk102ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tk102ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Tk102ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tk102ProtocolDecoder(null);
+ var decoder = inject(new Tk102ProtocolDecoder(null));
verifyNull(decoder, buffer(
"[\u00800000000000\u000821315452]"));
diff --git a/src/test/java/org/traccar/protocol/Tk103FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Tk103FrameDecoderTest.java
index 57df2ac5b..87c3d9317 100644
--- a/src/test/java/org/traccar/protocol/Tk103FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tk103FrameDecoderTest.java
@@ -9,7 +9,7 @@ public class Tk103FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tk103FrameDecoder();
+ var decoder = inject(new Tk103FrameDecoder());
verifyFrame(
binary("283836343735353535353535353535352C445733422C3133313131372C412C353536322E30323837304E2C30313334382E3038313934452C312E3539372C3232333730372C3239312E36352C2D302E31302C3429"),
diff --git a/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
index 321d0cb50..6c01c14f7 100644
--- a/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tk103ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Tk103ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tk103ProtocolDecoder(null);
+ var decoder = inject(new Tk103ProtocolDecoder(null));
verifyPosition(decoder, text(
"(868822040452227,DW3B,150421,A,4154.51607N,45.78950E,0.050,103142,0.000,595.200,7,0)"));
diff --git a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index b747fa960..40d9ff34d 100644
--- a/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tlt2hProtocolDecoder(null);
+ var decoder = inject(new Tlt2hProtocolDecoder(null));
verifyNull(decoder, text(
"#860517049471362#MT700#0000#AUTO#1\r\n",
diff --git a/src/test/java/org/traccar/protocol/TlvProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TlvProtocolDecoderTest.java
index 54d66dac9..d6d1b7275 100644
--- a/src/test/java/org/traccar/protocol/TlvProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TlvProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TlvProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TlvProtocolDecoder(null);
+ var decoder = inject(new TlvProtocolDecoder(null));
verifyNull(decoder, binary(
"30430f383630323437303330303934333931ff10393233323132323030303834353433340f533636385f415f56312e30315f454eff1130303a30433a45373a30303a30303a30300132"));
diff --git a/src/test/java/org/traccar/protocol/TmgFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TmgFrameDecoderTest.java
index 886470745..9cdcb6169 100644
--- a/src/test/java/org/traccar/protocol/TmgFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TmgFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TmgFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TmgFrameDecoder();
+ var decoder = inject(new TmgFrameDecoder());
verifyNull(
decoder.decode(null, null, binary("2424242424")));
diff --git a/src/test/java/org/traccar/protocol/TmgProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TmgProtocolDecoderTest.java
index 722df5306..6d3c36005 100644
--- a/src/test/java/org/traccar/protocol/TmgProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TmgProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TmgProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TmgProtocolDecoder(null);
+ var decoder = inject(new TmgProtocolDecoder(null));
verifyPosition(decoder, text(
"$loc,869309013800417,08032014,094459,1,2826.1956,N,07659.7690,E,0.0,2.5,4441,31,6,95,1,LLLL,NNTN,HH,0.15,0.26,HR38AU1389,0,SW0.1a"));
diff --git a/src/test/java/org/traccar/protocol/TopflytechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TopflytechProtocolDecoderTest.java
index dbc7210e0..b49345a42 100644
--- a/src/test/java/org/traccar/protocol/TopflytechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TopflytechProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TopflytechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TopflytechProtocolDecoder(null);
+ var decoder = inject(new TopflytechProtocolDecoder(null));
verifyPosition(decoder, text(
"(880316890094910BP00XG00b600000000L00074b54S00000000R0C0F0014000100f0130531152205A0706.1395S11024.0965E000.0251.25"));
diff --git a/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java
index e8da93006..5e7ec1136 100644
--- a/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class TopinProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TopinProtocolDecoder(null);
+ var decoder = inject(new TopinProtocolDecoder(null));
verifyNull(decoder, binary(
"787801080D0A"));
diff --git a/src/test/java/org/traccar/protocol/TotemFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TotemFrameDecoderTest.java
index 95949c51b..175c32848 100644
--- a/src/test/java/org/traccar/protocol/TotemFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TotemFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TotemFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TotemFrameDecoder();
+ var decoder = inject(new TotemFrameDecoder());
verifyFrame(
binary("24243030323542423836323031303033373239343836313345"),
diff --git a/src/test/java/org/traccar/protocol/TotemProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TotemProtocolDecoderTest.java
index e16774782..83498b5ac 100644
--- a/src/test/java/org/traccar/protocol/TotemProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TotemProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TotemProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TotemProtocolDecoder(null);
+ var decoder = inject(new TotemProtocolDecoder(null));
verifyPosition(decoder, text(
"$$0112E5864606045334223|201112223514,-68.923106,-22.455926,$Cloud,1738,621,730,12100,0,0,255,0,40,40,0,0,255,|13"));
diff --git a/src/test/java/org/traccar/protocol/Tr20ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tr20ProtocolDecoderTest.java
index def280b04..c4513cbdc 100644
--- a/src/test/java/org/traccar/protocol/Tr20ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tr20ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Tr20ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tr20ProtocolDecoder(null);
+ var decoder = inject(new Tr20ProtocolDecoder(null));
verifyPosition(decoder, text(
"%%TR20GRANT,L,210602170135,N0951.1733W08356.7672,000,000,C80:F0,00020008,108,CFG:6980.00|"));
diff --git a/src/test/java/org/traccar/protocol/Tr900ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tr900ProtocolDecoderTest.java
index d3d35b356..96ddf4175 100644
--- a/src/test/java/org/traccar/protocol/Tr900ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tr900ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Tr900ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tr900ProtocolDecoder(null);
+ var decoder = inject(new Tr900ProtocolDecoder(null));
verifyPosition(decoder, text(
">00001001,4,1,150626,131252,W05830.2978,S3137.2783,,00,348,18,00,003-000,0,3,11111011*3b!"),
diff --git a/src/test/java/org/traccar/protocol/TrackboxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TrackboxProtocolDecoderTest.java
index caac520e1..10603db1c 100644
--- a/src/test/java/org/traccar/protocol/TrackboxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TrackboxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TrackboxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TrackboxProtocolDecoder(null);
+ var decoder = inject(new TrackboxProtocolDecoder(null));
verifyNull(decoder, text(
"a=connect&v=11&i=111111111111111"));
diff --git a/src/test/java/org/traccar/protocol/TrakMateProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TrakMateProtocolDecoderTest.java
index ef99527d7..7542b3456 100644
--- a/src/test/java/org/traccar/protocol/TrakMateProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TrakMateProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TrakMateProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TrakMateProtocolDecoder(null);
+ var decoder = inject(new TrakMateProtocolDecoder(null));
verifyPosition(decoder, text(
"^TMSTP|352984083995323|116|13.07809|77.55979|131508|131118|0.0|146.51|7|0|71 -2 248|0|13.1|0.0|10.5|1|0|0|0|#"));
diff --git a/src/test/java/org/traccar/protocol/TramigoFrameDecoderTest.java b/src/test/java/org/traccar/protocol/TramigoFrameDecoderTest.java
index 80e6a6e81..a093d94e9 100644
--- a/src/test/java/org/traccar/protocol/TramigoFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TramigoFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class TramigoFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TramigoFrameDecoder();
+ var decoder = inject(new TramigoFrameDecoder());
verifyFrame(
binary("8000ed2bb0009c000101bee000050b09633d925b5472616d69676f3a205472697020737461727465642c2053686f636b2053656e736f722c206174204b696e6720437265656b20526f61642d46726565746f776e205374726565742c20506f727420486172636f7572742c205269766572732c204e472c20342e37363336312c20372e30313836382c2030373a31383a333620536570203320454f46"),
diff --git a/src/test/java/org/traccar/protocol/TramigoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TramigoProtocolDecoderTest.java
index 8b556b356..c2d13d199 100644
--- a/src/test/java/org/traccar/protocol/TramigoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TramigoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TramigoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TramigoProtocolDecoder(null);
+ var decoder = inject(new TramigoProtocolDecoder(null));
verifyAttributes(decoder, binary(
"8000c426b000a6000101c557037598050d5c8a595472616d69676f3a204d6f76696e672c20302e3132206b6d2045206f66204c617275742054696e2049736c616d6963205072696d617279205363686f6f6c2c2054616970696e672c20506572616b2c204d592c20342e38333134392c203130302e37333038352c204e572077697468207370656564203130206b6d2f682c2030303a34393a30382041756720392020454f46"));
diff --git a/src/test/java/org/traccar/protocol/TrvProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TrvProtocolDecoderTest.java
index 33d4e0124..6dc28d89e 100644
--- a/src/test/java/org/traccar/protocol/TrvProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TrvProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TrvProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TrvProtocolDecoder(null);
+ var decoder = inject(new TrvProtocolDecoder(null));
verifyNull(decoder, text(
"TRVAP00352121088015548"));
diff --git a/src/test/java/org/traccar/protocol/Tt8850ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Tt8850ProtocolDecoderTest.java
index 5d0e86a3f..3f5c60daa 100644
--- a/src/test/java/org/traccar/protocol/Tt8850ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Tt8850ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Tt8850ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Tt8850ProtocolDecoder(null);
+ var decoder = inject(new Tt8850ProtocolDecoder(null));
verifyPosition(decoder, text(
"\u0000\u0004,007F,0,GTFRI,020102,867844000667538,4142726856,0,0,1,3,1.6,0,997.3,-66.830786,10.483394,20171212171418,0734,0004,041A,4220,69,20171212171657,FF61"));
diff --git a/src/test/java/org/traccar/protocol/TytanProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TytanProtocolDecoderTest.java
index 1cab0f8b1..de6f3a6ff 100644
--- a/src/test/java/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TytanProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TytanProtocolDecoder(null);
+ var decoder = inject(new TytanProtocolDecoder(null));
verifyPositions(decoder, binary(
"B500192000001405125652CA9B1A325FC98D11A9990018020118FC0D"));
diff --git a/src/test/java/org/traccar/protocol/TzoneProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TzoneProtocolDecoderTest.java
index fba8f7db4..72f5dadd8 100644
--- a/src/test/java/org/traccar/protocol/TzoneProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/TzoneProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class TzoneProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new TzoneProtocolDecoder(null);
+ var decoder = inject(new TzoneProtocolDecoder(null));
verifyAttributes(decoder, binary(
"545a004d24240407010d0000018032100000031515090c052c2100000022030a033400201347000056860a03340020134700002feb0a03340020134700007d96000baa10211f01810127022d000001ebe00d0a"));
diff --git a/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java b/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java
index 77afbb50f..534287e0a 100644
--- a/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UlbotechFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class UlbotechFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new UlbotechFrameDecoder();
+ var decoder = inject(new UlbotechFrameDecoder());
verifyFrame(
binary("f8010103515810532780699f7e2e3f010e015ee4c906bde45c00000000008b0304004000000404002c776005060373193622110b00240b00fee8ffff807dffff606d0b00fee9af000000af0000000b00feee7d78807dffffffff100101cc2af8"),
diff --git a/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java
index b7c6d2d45..52f2520cc 100644
--- a/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UlbotechProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class UlbotechProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new UlbotechProtocolDecoder(null);
+ var decoder = inject(new UlbotechProtocolDecoder(null));
verifyPosition(decoder, binary(
"f801010353323083177450a703f6f0010efe55a31a0923d01400050070007003040a42000004040070cca00506039b1876220f060800000000000000000725310553410c0c9e310d05310f4641100440311119411f00476101810f8000310487411f00480804203a14c009033320159310f8"));
diff --git a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
index 8c12f48f7..3464a6fee 100644
--- a/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UproProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class UproProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new UproProtocolDecoder(null);
+ var decoder = inject(new UproProtocolDecoder(null));
verifyPosition(decoder, buffer(
"*HQ201999999,BA&A1656512233362911356523660000230618&B0100060010&C00000<6<&F0000&R2405&V0109&W0000003E&K00100&T65&I54600027A00FCB6227A00FCA5727A00E955327A00E8B5327A00F9748&Y54600027A000000FCB6227A000000FCA5727A000000E955327A000000E8B5327A000000F9748&b00A7E81007607#"));
diff --git a/src/test/java/org/traccar/protocol/UuxProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/UuxProtocolDecoderTest.java
index 753063d26..40776278d 100644
--- a/src/test/java/org/traccar/protocol/UuxProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/UuxProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class UuxProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new UuxProtocolDecoder(null);
+ var decoder = inject(new UuxProtocolDecoder(null));
verifyNull(decoder, binary(
"81910b01ff"));
diff --git a/src/test/java/org/traccar/protocol/V680ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/V680ProtocolDecoderTest.java
index 59b6dbea9..105dc8339 100644
--- a/src/test/java/org/traccar/protocol/V680ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/V680ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class V680ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new V680ProtocolDecoder(null);
+ var decoder = inject(new V680ProtocolDecoder(null));
verifyPosition(decoder, text(
"#867967020910610#01234567890#1#0000#AUT#1#0500000000120000#114.036291,E,22.665795,N,111.00,000.00#111116#193333##"),
diff --git a/src/test/java/org/traccar/protocol/VisiontekProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/VisiontekProtocolDecoderTest.java
index b079346c9..042b66cae 100644
--- a/src/test/java/org/traccar/protocol/VisiontekProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/VisiontekProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class VisiontekProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new VisiontekProtocolDecoder(null);
+ var decoder = inject(new VisiontekProtocolDecoder(null));
verifyPosition(decoder, text(
"$1,117,28,01,16,15,05,48,1725.0518N,07824.5298E,0620,11,0,185,2062,0,0,0,1,1,1,1,24,00.0000,00.3740,00.0000,VAJRA V1.00,A"));
diff --git a/src/test/java/org/traccar/protocol/VnetProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/VnetProtocolDecoderTest.java
index d43176a45..25cc03781 100644
--- a/src/test/java/org/traccar/protocol/VnetProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/VnetProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class VnetProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new VnetProtocolDecoder(null);
+ var decoder = inject(new VnetProtocolDecoder(null));
verifyNull(decoder, binary(
"24240000140029111909062986818303379282604c452e322e30302ea32b020f0000d3552323"));
diff --git a/src/test/java/org/traccar/protocol/Vt200FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Vt200FrameDecoderTest.java
index 91cc3d317..7d039dc8f 100644
--- a/src/test/java/org/traccar/protocol/Vt200FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Vt200FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Vt200FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Vt200FrameDecoder();
+ var decoder = inject(new Vt200FrameDecoder());
verifyFrame(
binary("28631037309456208400340102dc0906171616454415760201144494473f920a0c0000030500200100417c1f383a9d1090510000006a00007000000e00180ee129"),
diff --git a/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java
index 791751c27..25ce5550a 100644
--- a/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Vt200ProtocolDecoderTest.java
@@ -9,7 +9,7 @@ public class Vt200ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Vt200ProtocolDecoder(null);
+ var decoder = inject(new Vt200ProtocolDecoder(null));
verifyPosition(decoder, binary(
"28192030961807208200210101b919011818375801245774036424612500160917000003aa008800007b00aa3429"));
diff --git a/src/test/java/org/traccar/protocol/VtfmsFrameDecoderTest.java b/src/test/java/org/traccar/protocol/VtfmsFrameDecoderTest.java
index c03511160..e381153a2 100644
--- a/src/test/java/org/traccar/protocol/VtfmsFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/VtfmsFrameDecoderTest.java
@@ -10,7 +10,7 @@ public class VtfmsFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new VtfmsFrameDecoder();
+ var decoder = inject(new VtfmsFrameDecoder());
assertEquals(
buffer("(863071010087648,0HK44,00,000,14,2,9,,A,114946,180313,11.0244,076.9768,282,000,00000,00000,K,0000128,1,12.8,,200,2.501,,4.001,0,0,0,0,0,0,0,,)105"),
diff --git a/src/test/java/org/traccar/protocol/VtfmsProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/VtfmsProtocolDecoderTest.java
index 1d4fa7f21..4925d9769 100644
--- a/src/test/java/org/traccar/protocol/VtfmsProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/VtfmsProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class VtfmsProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new VtfmsProtocolDecoder(null);
+ var decoder = inject(new VtfmsProtocolDecoder(null));
verifyPosition(decoder, text(
"(861359037432331,0EF87,00,0,21,2,01,,A,154559,230119,1101.4046,07656.3859,241,000,00078,00000,K,0000812,1,12.7,,,,,,1,0,0,0,1,1,1,+919566531111*+919994462226,)054"),
diff --git a/src/test/java/org/traccar/protocol/WatchFrameDecoderTest.java b/src/test/java/org/traccar/protocol/WatchFrameDecoderTest.java
index 91bccb4c0..42464c6fe 100644
--- a/src/test/java/org/traccar/protocol/WatchFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WatchFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class WatchFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WatchFrameDecoder();
+ var decoder = inject(new WatchFrameDecoder());
verifyFrame(
binary("5b33472a3335323636313039303134333135302a303030412a4c4b2c302c302c3130305d"),
diff --git a/src/test/java/org/traccar/protocol/WatchProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/WatchProtocolDecoderTest.java
index 50baaa81a..4d908b750 100644
--- a/src/test/java/org/traccar/protocol/WatchProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WatchProtocolDecoderTest.java
@@ -12,7 +12,7 @@ public class WatchProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WatchProtocolDecoder(null);
+ var decoder = inject(new WatchProtocolDecoder(null));
verifyNull(decoder, binary(
"5b5a4a2a3738393436383035303034323639322a303033342a303433392a4a58544b2c302c77617463685f375f32303232303532363039333935342c312c362c2321414d520a0c0a3c3f96d98367e9468ea245320c0a3c3f96d98367e9468ea245320c0a3c3f96d98367e9468ea245320c389814ffcd762fe49d50ae7a2e0cb528aefbf76911df05c2fbe17d050c2200cff77ef0df4d9b4ab9a4340c449814dbe7c63fa82bc3750d800cc48abbffddb0df8e8fda95e5980c49982ff6cf65f9377d02a39c3aaa0c389805f2ff42c1b80e0a0eb1dc0c2998e9defe15cfa3bdbe80d3540c7298c2f6d9239e3eae3c4a81660c490034dbfd513fedad0c2fc3900cc40039b7f71bb0657ba75558c40cd7813b97ff7219777ec7f401260c7d040003bff6f75fdb898a6ba1140cecd127f7f83357cb73a68a5f680cb081d4f6e749e6af8ed367bc480cec1815dfffd2dbed358112af320ccc21179fffbd17a3a61c133b380c920047defc72a784770ec0fe400c383c42f6faebe76fa736e9d1be0c4918e7decddc67ec9afd87ff220cc418e6bffe6cf6c9ac1f83c3900ca6cad1ffe3da24e1be3b547d03c00c6b00b8fee77f60a76d3e7d0292e20c2918b7bfff76387b793d3a36300c7d0400b7fff7f63ae513ac6f74de0c980016fbff7d01f9b30fca67c7220caa982ff6dbd7bf3d8dfed143ec0c44982fdfcb7b517e26f6ea52420c0ed19cfedb438f179d3fc50ec40c008ad2ffff635fe28dc1ec1f860c76cb7d05bffda53eaebe4d201ae20ccccaffbbfd3db4abb6ddf39d0e0c6b00acfeff406fe4a12661caf80c76982fbffffeb17b2f65472f300c7d04c24bf6ef1b10e47f73fc10b40c76036cfecd4e7837145a6a8e900ccccaf2beeba36fbaa36feb60640c7d0400dfffff73bfa3b87d0256a1700c7d04e4efd6efc23b651eb73e77780ccc1813ffffb39f6baa6f3195080c00007afffee0b9df6346ca08d00c6bca7d04feff4d64a7b56f9855da0c769819fbfd954ea5bd7d040ba6420c4c4c09bfffd5f6c57d01930e7d01220cc48a22dffe30bfcbaf08a795140c7d040433b7ff3cba5f3e336a40060cecbd2bfaf775bea7bde7e095ee0cc4caaef7fb623feeaab69eabc20c8c0021bffd1ea4a1b090175a920c7d046445fbdfc1abe910b0ca56160c7d0440cbd7ef03893c7f7d02e1a8c20c85e42dff5fdaa145759d326b5a0ccc4084f75f8eeb7b15e4eb4ff80c6bc22ef7d7eaf8df3b8ff678cc0cca4026f3cf7518fd731ceca3560cec041ffbe7655eaf822f04c4fe0c7d0478e3fbfcb5dfc8a81fdbb9e20cc418e6d7ff777f26affe37cc020cd7977cbff7d0aecb9727be6a0c0c00bde1f2d797fc8754ed09d4ae0cc498279f7e729fcb9eff70c1a60c7d0478e5bfffc67eef953fda69aa0c7200f1bbf7e891ef5a287cb5b80c983629fee5555f739f8a29279a0c76d103bef73f55a6bf89ba8ce40cc46424f6ded9a194167a067d05880cc4780efeffc37fae944d89bfb40c4464bffffb6dd54e8344394a5c0c49781ffffc653feaa31af59ac00cc464cebfd76ae4e8a55d5b5a4a2a3738393436383035303034323639322a303033352a303434332a4a58544b2c302c77617463685f375f32303232303532363039333935342c322c362c5f24fbbc0c7d04983effcfe35fbd8fff7ce6f60c448a1dfbd715bec3b42448e58a0c0e0421bf5f17ebc31a43301bc40c768ababf4f66cf629ee31fe9900c6b6426bf5f4eb7669dacc439140c945733bff9351e7d04ab6be54ef60ccc98bfbffbf67f63b78d8f42880c7d0400c6f7fffab5cbae8e8275da0c0097ffdefff5dfafb0c4727d04980ccc78d1f6ff1a6b7e37631059fa0c760045f3fd853fea877d03aa87440cc40022f7ffa8b5c58f6e80c58e0ccc4c1f9ffff32fa7af87de04560cb09801f6fdd32efcbdad9495b60c6b987d05bff72d61eb687d05a9f9e20cca57c7ffff6cb1fe3387ea596e0c629823dedfbfc50b97965e44ea0c4918ccbfd7cc75e59fff92e9ee0c8c78e7faff707ffda60ec3ada60c30c217befffcb8f3290f06d75e0c0e8a7bb7dff3eec7b7928ef6680c38ca1cdeff272ba012597d051a520c0018dfffeff27d01e369b3bcd7d80c98146eb2fc7f45c38e1ce53e120c3d5700ff7fd44bee28aa089d900c007157bffffe30302d7d0583585c0ccc5747bfe7f73cff7d02de1098240c7d047865f6feca71d70bdfaab6a20cecb946bfd966be74b61a06c6660c441612ffe7eb966a8c2886cf760ccc7827bffd653ff7980a62e9320c00ca98f7fc1b311a3986700cc20c490017bfff70cfe7bb455637320c6228afbf7e6da4c59763b693740cccc2b5fee1951975760e4a9dca0c0000faffdb255f6f86af4be6fc0cccc2ffdfff7d0225efbc847c42760cb48a8fdffbe23ff1a78782cbe60c7d04980cffff6e6dfc75a6c65a500ce62808bfff24f853748a9537400cb4004ebfeb6e70aa4314903e8c0cb46408ff72d62f44945f64897d040cccca7abfff2db5c6bfcc345e700c7d04c24dd6fd5f95638f78974a800cc4caffffffb17d01c36bdd7d047c2e0c7d0436d1f7f8917f83af7fc5c2180c070449f6fe570f128577c8c97d040c7d047813f6df3fd17d026b6790d1b80cc400c9d6d92dc56497843ed10a0c44986effffe13fef8eef7c717a0c7d049872bbfdad3abe2be0d60b240c4900adbf7d02dfa4ef960fdf23580c629845fefc5a650fbf8b0d4cda0c7d040076b7ef273fe78fce983ae40c4a00ded7ff629f7fab4531501c0c6200b7ffedf13fe6a68f01fb6c0cc49809f77fdb91517fb39e8ba00c760009bf7fd6afe7b46921f27a0cecbd1df6faf99120776e807d03fe0c98ca23fbff3749fb5ed3909c160cc44cbbbfffbd70e77d0367bc2e740c499816f77fe2ffe08edd7d048c9e0c940021beff1df0f1338c2f1a3a0c7d040083feebba1c756e5760c2200c94981dfffdf921b92b99909ba40c7d04984ebbdf7ff0c77d025a1fbfc00c7657b3ff77f4befcae2bf625640c62ca53f7fdb35f2e92af3bd5c60c7d049878bbdfc0dfc1bdaa1918000cc404bbbfefb41ee6b50a39bf180c767874f7fb8ee156320ee600020c69981cffffe0fff6bb2764acaa0cec781bfbff7d0324eb9b4b4d5d5b5a4a2a3738393436383035303034323639322a303033362a303433302a4a58544b2c302c77617463685f375f32303232303532363039333935342c332c362c73580c07ca4fbbfff5bec5abcfac465c0c0042a8beff316aed38fe4603dc0c7d04577d04fefdc929f7294ce7520c0c76984dfaff402fe68ebe113b000c7d0436a6fed465ff4f8d8e3306300c44e434f7f79e84abb8fa081be80c983636bef7e128bf7d03d34c71c80cd7982dffd54cac94536beab1320c058bd6bfff701fe69d1a39d1e80c76caedb77ffea0e47febb469440c0098b2bef5e55eed981672b1c40cd800d1bef4bda58daf7d01d309180c08cadffbfc31799f5613fab2da0c7d049828beffa5eea0bd09a14c2e0c0000e59feb5f9dff7f4945e98e0cc40046ffcfe57fb58f7d053dd9e20c7d040047d7ffd38f67aa9db8d38c0c7698d2df5fe2efc6bb0f5a18220c980367bbfd95dae73e3bf2b59a0c49813796fdf5efab9d3ed7d3d80c9800ebd7fdb831ae8f91811e920c7d04ca74bbff5cdcf45605c25f140c013e029fbfe7ffc299376b409a0c7510009e7d02010f68824cccead60cb13b00f7d5821e6c8d594a06880c75ec00f6e782e8f06b0c610d1a0cc09843dfef117fa5b3aef236f40cdcc208ffff4831f83703ca20c00cc09800bf7fd71eec9ba34e3c200c650f6bffd5bc4dbe7ec5b0f1d80c0d1c1f92ef917fa0b96023eac00c8efb1db6bfa42eed9f69051d4e0c8eff23b2fe4486d56ef44f702e0c8ebc1b9657d46eeea852ac337e0c8efb1f96d9877fc9b34c38f1540c121c2796df13577c727f8cedec0ca9107d05afdd6a9d957ab76c02560c121c2dd6bfd33fa5b844f27d02340cb11037b6e3962e6eaf52d6e7460c2b1c3db2dfe61eef9aad3dcc0a0c542e42d763e709fe723a83ae7c0c7cfa56bf7fedb8763c3f8ab2c00ca40022efff2411604d22a485e00c228adcbfdfcd748293c66b0bf20cb10f0097ff806dcf7a0a640d6e0c5a0400b7e3030ef4ae0a6046f80cb82812fe7b04d77e4bab11894a0c541c24b2dd53fea5891e3824420ca9fb26b2d7156fa485049cac420ca91c2d9edb2487526c2e2260fa0ca9bc25b65ff28e41a34232c0f00c8efb25b649e51ec39c0ae6703a0c70f425a6c820dfaf2f8124c8960c80f42794b323aed9ca9b6924be0cb93b278e3e8d929c36bb70b6360c587b27524f85857d056d214841660cda2f278b4c876eb3186e5acc540ce6832f6e3f0d82f81226e6dc3a0c0b922feff50a03d03c98ae28360c03d62befb54ab611de0c8addee0c84d626b7fdb4461556dc0153040c0b0f27ff5781c5c2b32f6762140c49bf2dfaf521969b702ecb11d80c7d050f27cfed75bfab95dc4af3180c011c3d8e7451df80a5cd0948080c7c2e35f2c7b0becca22e50769e0c7c1c3d965e628f46a9a58ae6100c7c2e3b965f4a6b5ebd1436b0b00c7c863eaedf18c7816cdeeed7e20c2b3e3df6b73952b2b1abc048a00c7cfb3db6cd67ae68cda18af9d60c2bff3e96df12ff61b39627cd580c7c863fd6cd810ee595d85ee6645d5b5a4a2a3738393436383035303034323639322a303033372a303433372a4a58544b2c302c77617463685f375f32303232303532363039333935342c342c362c0c7cff3fb65f812fe196dc62d8360c7c2e3db2de738fae9ca7c7236c0c2b2e3d96df6c1d775a3df5a47e0c7c3e3f96fe943dc07e81e170700c75503fb7d6a6197f1b08df85440c5a133ab6d6a0e68f3acb04b7b00cfa293fd6cfc20c390d5265d3c80c581347b278077d03dc22d9e49c680ce64d47924e8dcdffe9be19dc100cb90f4f9e612d2201961c2e111c0c003b4febb58a96c809ab5a71040ce6d759fbddba54b2aa9d9d983e0cc029576ecf1f703099d84994520c4029579e7d0281577073f5629dd80c5a2952b6fed177177d01e57d0175c20cd8647d044f7e3c58aba523ddb0720cb56753d3e9c6799f95938401f60c756414ff5f00fb57bc4d7e111c0c7c085573ef743ee19ca30057e00c752e5ab77e34eec69f3cbe53940c542e4d96d6e7ff03854a9506620c7cff55b6efca197610a86606180c7cfb55b67eb25f4b999c002bf20c7c107d03beeb451fad8d042492740cb8f05eb5ff664f679c1cc991c60ce1671bffd33d9445b57d0584c7d60c07781dfef5e3ee81b45ff8a8c80cc40072b7dfe6fe6e978257253a0cb1131fe6783035868e439b00d80c583b27b17ecb53dd165c3422180c703b2fbeb18d023e14d90304700c3cce2b93cdc2e6b3550a5546160cb13b3b72fe24273859059b52040c224d34edc742f6bb7c877d02b5940cb84d37cdcfcbc3f03a041cf4ac0ca4923a9f3b74e805b235cce8660c759000fbfd90565072aa7d03bb520cb592017f411dcbe80a0cc420360c09d6528fcf2e25b382ee46d75a0ce2e853d3cfb617fd7d023f05e0780c07cc3bbabfa9f6cec5aa48ac600c404208fb678a4cf16a9c09098c0cf14244fbdfc2afe7932fe57d02900c011c369e7d0264a8570a54f9a2e80cb1103daed6249fe59dc888c2ac0cb1103573c5f697be759923ecc80c705f7d059effaaa4b09b976f375a0c804223bbed89767d041693edab180cb49819d7eb5a8573bb10c951540c3c643af74f021f25b6dd3b7d02040c07982bd73fb31fe38f09a227a40c037610ff7d03c6058098fef936a80c03b808debbe055a1a71319128c0c6b8f2e9e3bb52d71c226d3141a0cdab82d7fa9d416167a1cb950020c03c32bb23ee9e3743f3b6853060cc02937adb5157d05f4a6960c1b680c4076365e6b754bda9394a7aa720c06293ef23313fb1b94bcc2c09a0ce676006bbd8e0417941b90d23c0cb9294f7d01fd3d65748cf6d1cc220c03767d035e3a65e6f2514ab1db060ce6d965bf4035f65c79a9e4446a0ce62921dbf46457b56cd65f6c500c584d6bba7ea8166edd6cf7693a0cb939227bfca25f82a7c4202f2e0c06ce2b9a4f0d95f39eb43c22840c06901eef6fd15fe48f452000e00c62023afbffb269beba0ee0ac540ce6ec00f37b8139f2026e80f1440c22501dfe7d017d03ed8c3ff6803f240cc48ae3b7fd725e63a347cd64100c0094f8efdeb0a9f35c83eb06b00c005d5b5a4a2a3738393436383035303034323639322a303033382a303433332a4a58544b2c302c77617463685f375f32303232303532363039333935342c352c362c6647deef2df57fb68fd76b660c44e43cbfefc0beec867d025c3f920cb4507d01ff6f42ee6c1f58a0db0e0c7d045701ff7f19f9f90fdff037c20c4404259efcd47d02a52b7ef6df0e0c7d04d128f3578db14779993109560ce1e41ecffd2851af49256b1ecc0c7d049837ffff707168db3dd1ac240cc09419f7f39a7d013d6ec1b4e55c0cc4881cff5f49f55fadc52285a40c06ce9ad7dbb8349b97031ac3b00c407d049d9bed74dfadad950eab560c06799ffac7a924b18bdf11c3d40c8054a2f777522e65be921a77240c8042a19bff706fe5b7e3e7d0360cd82840bff3f4fe429bea0081560c0064419fd9157f8b9c797e92c20cc47fe2b7d5e6ee45bf0524010e0c0894299e7d037e4553bcbbc0989e0c40501bbbdc926f8daf53885e0a0c80971ffee559f5bf98ed54cf140c00581abbffac75b88b14d5e3780c5a046dd66fd7bfe5b7ca749df40c403672bbcfe47ee797860ded5e0cb5502efb7ee2ffc7bbdc27d0880c44ca08fbf7031ecd9321d21ef40cdc9806fefde36f0699ad1569420c22cb1bfbdc974fcb900ab601440c00cb1cfbdfd2f7d2730b0b46680c0b4203dfef309fe0adc121e2080c225829feeb901f25b926343bae0c624204dfff4875b69ceda4df4c0c499886ffe7301e8e8bf9ef0a260cdce408dbef829fe45337e98d860c010800ef76088d8015f3b2c84e0c755c3ecfc898f50fbcdb9344220c7c7d03459349337d01e4949da1b4ec0c7cf046ae6e4a90df3552070a5e0c7cf045d23fbba0951147986eca0c7536426e6ef2ef0b7d01c22fd2960cb8284e9db92d40552988334f200cb8024acdbfea90d13b545fe35e0cb8f04d5e48659d48b97c1096140c7c084f79df4402702126bf358a0cb8a74d4def66535e145638d12e0c543e4d8edfa2531b15a340eb800cb83e4eafbd9031291a8563e4780c54a74ef1c7300da79aa94bb67d050cb8f04eba6fb0325813871511b80ce20ff6fffd404ed58ecf264c8e0c7c0f1cb3fe1a36fb7187c379d00c7c3e52f6727d0261ca8bdd1361b80cb8d64d9a4fb1cfe0aadaaa7d05c40c2b2e44b2bfb9b4dcad9d7d0200280c7c3b47d5db803fc2aee71a77f00c7c1343b2bfa06ee6ad3228f10a0c7c3b4a76477fe7650b0c809ca80c54d74b92dbc327134514d6126e0c7c5f4a8f4f74efaaa5cd0a43bc0c7c104bb64ff5ce604fa2028b680c7cff4aaec7f7a9394cc4c599e60cb8ce52eeb553d215a6a466b4120c750f4fae5f9816c04a0a3f751e0c75e04f73c58e96bb4b925a4c680cb80f4b6e3fe1635614bbdeccbc0c7c3b4faf7e825e42d473ee76800ce298578ffcb61f0af936387bbe0cb800e39bf62410681583e0d2b20cb4987d05ff7f297bf69eaf4cd8b40cb57815bf7f300fcffe9fae966a0cb497acd75fd37f648d00d141a00cc48af9fffe1a3b979b8f8573e80c29bff1bf4b94c6fd7c3eec075e0c7cce1f5d5b5a4a2a3738393436383035303034323639322a303033392a303065352a4a58544b2c302c77617463685f375f32303232303532363039333935342c362c362c8f5cf9f34fa6edceb18c0ca4ce436e7d02d329de94b63eb11a0cb894438f44cf753dbc1a83b4560cb8e44391eff729d4155a231bf40cb59443f373b4288492cd6e38160c5a42049bfec8678ad42bce0c560cb12e39fec3d1fe24b5572ee0be0cb1ce35fe33688455aa74e3ffa40cb1d635df4b704160ae864a7d03440cb10f3267dbf4a21d540ca1051c0cb11337724f8747f5547d054e91660cb1a73692df964f3bbb0758d41a0cfe05b60c314460297eae4185f20cad673ceb6dfa05ddbe0278d5de5d"));
@@ -145,7 +145,7 @@ public class WatchProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeVoiceMessage() throws Exception {
- var decoder = new WatchProtocolDecoder(null);
+ var decoder = inject(new WatchProtocolDecoder(null));
var mediaManager = mock(MediaManager.class);
when(mediaManager.writeFile(any(), any(), any())).thenReturn("mock.amr");
diff --git a/src/test/java/org/traccar/protocol/WialonProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/WialonProtocolDecoderTest.java
index 12724c32f..6953784fb 100644
--- a/src/test/java/org/traccar/protocol/WialonProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WialonProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class WialonProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WialonProtocolDecoder(null);
+ var decoder = inject(new WialonProtocolDecoder(null));
verifyNull(decoder, text(
"#L#2.0;42001300083;;CE45"));
diff --git a/src/test/java/org/traccar/protocol/WliFrameDecoderTest.java b/src/test/java/org/traccar/protocol/WliFrameDecoderTest.java
index 2e0d86a61..45c86ae1a 100644
--- a/src/test/java/org/traccar/protocol/WliFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WliFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class WliFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WliFrameDecoder();
+ var decoder = inject(new WliFrameDecoder());
verifyFrame(
binary("0231000101bba758c900010034000500ff001001258fc9013e80ed00001183350101e20006003200090030000a0032000b003331000c0031000d00343438000e003530000f003100100031303800130032001b003134001c0033392c33352c32382c33382c34302c33372c33332c33382c33352c34322c33372c3335001d003130001e0038002300343235002400303100250031303432320026003336343733002700323800280037002900312c312c312c312c31302e3232352e3135312e3230342c36353533352c302c39392c39392c3235352c3235352c3235352c323535002a0030002c0030003000300032003000330031003400ff001c0214130502061b0101258fc9013e80ed000001e2000000000000004d004500302c323031392f30352f30322c30363a33333a30302c323031392f30352f30322c30363a32363a3230005a003000f100352c302c342c302c2d312c2d3100f2003300f3003100f50038363634323530333137303639323400f600312c302c302c3431322c3000f70038343437373200f80032312c31312c302c302c302c302c2c2c2c2c2c302c3000f9003300fa00393100fb0032313100fc0032313000ff00313535363737383533340003"),
diff --git a/src/test/java/org/traccar/protocol/WliProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/WliProtocolDecoderTest.java
index 77184f86a..e74b1df06 100644
--- a/src/test/java/org/traccar/protocol/WliProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WliProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class WliProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WliProtocolDecoder(null);
+ var decoder = inject(new WliProtocolDecoder(null));
verifyNull(decoder, binary(
"0232776c693a30343930333332303332343103"));
diff --git a/src/test/java/org/traccar/protocol/WondexFrameDecoderTest.java b/src/test/java/org/traccar/protocol/WondexFrameDecoderTest.java
index 85a878aef..a1cbfe737 100644
--- a/src/test/java/org/traccar/protocol/WondexFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WondexFrameDecoderTest.java
@@ -11,7 +11,7 @@ public class WondexFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WondexFrameDecoder();
+ var decoder = inject(new WondexFrameDecoder());
assertNull(
decoder.decode(null, null, binary("f0d70b0001ca9a3b")));
diff --git a/src/test/java/org/traccar/protocol/WondexProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/WondexProtocolDecoderTest.java
index 111cc9fbe..72ba8e163 100644
--- a/src/test/java/org/traccar/protocol/WondexProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WondexProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class WondexProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WondexProtocolDecoder(null);
+ var decoder = inject(new WondexProtocolDecoder(null));
verifyPosition(decoder, buffer(
"2005010051,19990925063830,26.106181,44.440225,0,0,0,7,2,0.0,0,,,0"));
diff --git a/src/test/java/org/traccar/protocol/WristbandProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/WristbandProtocolDecoderTest.java
index 10381168e..b901820fe 100644
--- a/src/test/java/org/traccar/protocol/WristbandProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/WristbandProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class WristbandProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new WristbandProtocolDecoder(null);
+ var decoder = inject(new WristbandProtocolDecoder(null));
verifyNotNull(decoder, binary(
"000102004459583836383730343034343735303035357c56312e307c317c7b4630342331382c30372c332c3539303139322c33303a31382c30372c332c3539303139322c33307d0d0afffefc"));
diff --git a/src/test/java/org/traccar/protocol/Xexun2FrameDecoderTest.java b/src/test/java/org/traccar/protocol/Xexun2FrameDecoderTest.java
index aeca95376..7209a423b 100644
--- a/src/test/java/org/traccar/protocol/Xexun2FrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Xexun2FrameDecoderTest.java
@@ -8,7 +8,7 @@ public class Xexun2FrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Xexun2FrameDecoder();
+ var decoder = inject(new Xexun2FrameDecoder());
verifyFrame(
binary("faaf0014000286147503139003400032f2b001002f4260b0d6a0008019104a3378323130333135317c323130333132303100704020308715758089502023015648643670faaf"),
diff --git a/src/test/java/org/traccar/protocol/Xexun2ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
index 9faccec01..840c38b52 100644
--- a/src/test/java/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Xexun2ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Xexun2ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Xexun2ProtocolDecoder(null);
+ var decoder = inject(new Xexun2ProtocolDecoder(null));
verifyPositions(decoder, false, binary(
"faaf00140a5a8618810536243350005ed8e101005b64622880401b001482060864cc2296f840daa22aa884f008c87483c291efddc4f09fc2f49db3c058ef68005a9abe1ae8299d6449bac4e984e0c1d6baa8469d265ff2b60100cc00080000fb2e0013572a3600000002000000000000faaf"));
diff --git a/src/test/java/org/traccar/protocol/XexunFrameDecoderTest.java b/src/test/java/org/traccar/protocol/XexunFrameDecoderTest.java
index 43b8bdc0e..9bc39fc97 100644
--- a/src/test/java/org/traccar/protocol/XexunFrameDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/XexunFrameDecoderTest.java
@@ -8,7 +8,7 @@ public class XexunFrameDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new XexunFrameDecoder();
+ var decoder = inject(new XexunFrameDecoder());
verifyFrame(
binary("4750524d432c3230353933352e3030302c412c353134302e343335302c4e2c3530312e303638362c452c302e30302c302e30302c3132313031352c30302c303030302e302c412a37302c462c2c696d65693a3335393538373031343731383339322c"),
diff --git a/src/test/java/org/traccar/protocol/XexunProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/XexunProtocolDecoderTest.java
index d2caa9c55..f7599b4c3 100644
--- a/src/test/java/org/traccar/protocol/XexunProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/XexunProtocolDecoderTest.java
@@ -6,9 +6,9 @@ import org.traccar.ProtocolTest;
public class XexunProtocolDecoderTest extends ProtocolTest {
@Test
- public void testDecode() throws Exception {
+ public void testDecodeSimple() throws Exception {
- var decoder = new XexunProtocolDecoder(null, false);
+ var decoder = inject(new XexunProtocolDecoder(null, false));
verifyAttributes(decoder, text(
"GPRMC,.000,A,0.000000,S,0.0000,W,0.00,0.00,,00,0000.0,A*55,L,,imei:353579010727036,"));
@@ -53,7 +53,12 @@ public class XexunProtocolDecoderTest extends ProtocolTest {
verifyPosition(decoder, text(
"GPRMC,043435.000,A,811.299200,S,11339.9500,E,0.93,29.52,160313,00,0000.0,A*65,F,,imei:359585014597923,"));
- decoder = new XexunProtocolDecoder(null, true);
+ }
+
+ @Test
+ public void testDecodeFull() throws Exception {
+
+ var decoder = inject(new XexunProtocolDecoder(null, true));
verifyPosition(decoder, text(
"171007160505,,GPRMC,160505.000,A,5323.4680,N,00252.4202,W,000.0,129.7,071017,,,A*7A,F,ACCStart, imei:864504031916915,10,41.1,F:4.28V,1,135,19824,234,15,0062,B7D5"));
diff --git a/src/test/java/org/traccar/protocol/XirgoProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/XirgoProtocolDecoderTest.java
index f3a56a79d..db9c829aa 100644
--- a/src/test/java/org/traccar/protocol/XirgoProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/XirgoProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class XirgoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeCustom() throws Exception {
- var decoder = new XirgoProtocolDecoder(null);
+ var decoder = inject(new XirgoProtocolDecoder(null));
decoder.setForm("UID,EV,D,T,LT,LN,AL,GSPT,HD,SV,HP,BV,CQ,GS,SI,IG,OT");
@@ -31,7 +31,7 @@ public class XirgoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeNew() throws Exception {
- var decoder = new XirgoProtocolDecoder(null);
+ var decoder = inject(new XirgoProtocolDecoder(null));
verifyPosition(decoder, text(
"$$352054058132185,4001,2017/04/21,00:01:05,32.54659,-116.90670,143.2,0,0,0,598,0.0,12,0.9,765840,7.0,14.5,19,1,1,0011,8.5,63.2,5,21999,184,255,671,207,100,185##"));
@@ -59,7 +59,7 @@ public class XirgoProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecodeOld() throws Exception {
- var decoder = new XirgoProtocolDecoder(null);
+ var decoder = inject(new XirgoProtocolDecoder(null));
verifyPosition(decoder, text(
"$$354660046140722,6001,2013/01/22,15:36:18,25.80907,-80.32531,7.1,19,165.2,11,0.8,11.1,17,1,1,3.9,2##"),
diff --git a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java
index 3197ba854..8ed175a74 100644
--- a/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Xrb28ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Xrb28ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Xrb28ProtocolDecoder(null);
+ var decoder = inject(new Xrb28ProtocolDecoder(null));
verifyAttributes(decoder, text(
"*SCOR,OM,123456789123456,Q0,412,80,28#"));
diff --git a/src/test/java/org/traccar/protocol/Xt013ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xt013ProtocolDecoderTest.java
index f8ddd35c3..007af984e 100644
--- a/src/test/java/org/traccar/protocol/Xt013ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Xt013ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Xt013ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Xt013ProtocolDecoder(null);
+ var decoder = inject(new Xt013ProtocolDecoder(null));
verifyPosition(decoder, text(
"TK,862950021650364,150131090859,+53.267863,+5.767363,0,38,12,0,F,204,08,C94,336C,24,,4.09,1,,,,,,,,"),
diff --git a/src/test/java/org/traccar/protocol/Xt2400ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Xt2400ProtocolDecoderTest.java
index 1b3f6fcbb..35cb3c3fa 100644
--- a/src/test/java/org/traccar/protocol/Xt2400ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Xt2400ProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class Xt2400ProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new Xt2400ProtocolDecoder(null);
+ var decoder = inject(new Xt2400ProtocolDecoder(null));
decoder.setConfig("\n:wycfg pcr[1] 012801030405060708090a1213c8545657585a656e7d2cd055595d5e71797a7b7c7e7f80818285866b\n");
diff --git a/src/test/java/org/traccar/protocol/YwtProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/YwtProtocolDecoderTest.java
index 1d29b1282..81afe53a3 100644
--- a/src/test/java/org/traccar/protocol/YwtProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/YwtProtocolDecoderTest.java
@@ -8,7 +8,7 @@ public class YwtProtocolDecoderTest extends ProtocolTest {
@Test
public void testDecode() throws Exception {
- var decoder = new YwtProtocolDecoder(null);
+ var decoder = inject(new YwtProtocolDecoder(null));
verifyPosition(decoder, text(
"%RP,1222102985:1,170509033842,E102.146563,N14.582175,,0,320,10,0,00-00-00-00-00-00-00-00-00-00-00-00,,1db2-02b3-52004,3>941.523-32,7>1,19>-16,20>30.9V"));