package org.traccar.protocol; import io.netty.handler.codec.http.HttpMethod; import org.junit.Test; import org.traccar.ProtocolTest; public class SpotProtocolDecoderTest extends ProtocolTest { @Test public void testDecode() throws Exception { var decoder = new SpotProtocolDecoder(null); verifyPositions(decoder, request(HttpMethod.POST, "/", buffer( "\n", "\n", "
\n", "1\n", "LIVE\n", "
\n", "\n", "891801957\n", "0-3112123\n", "0-3112123a\n", "NEWMOVEMENT\n", "SPOT Trace has detected that the asset has moved.\n", "2017-12-27T13:19:38.000Z\n", "1514380778\n", "-1.28781\n", "-47.93042\n", "GOOD\n", "\n", "
"))); } }