aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/handler/DistanceHandlerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/traccar/handler/DistanceHandlerTest.java')
-rw-r--r--src/test/java/org/traccar/handler/DistanceHandlerTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/java/org/traccar/handler/DistanceHandlerTest.java b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
index 7d2f1e2e3..04a27ad79 100644
--- a/src/test/java/org/traccar/handler/DistanceHandlerTest.java
+++ b/src/test/java/org/traccar/handler/DistanceHandlerTest.java
@@ -15,14 +15,15 @@ public class DistanceHandlerTest {
DistanceHandler distanceHandler = new DistanceHandler(new Config(), mock(CacheManager.class));
- Position position = distanceHandler.handlePosition(new Position());
+ Position position = new Position();
+ distanceHandler.handlePosition(position, p -> {});
assertEquals(0.0, position.getAttributes().get(Position.KEY_DISTANCE));
assertEquals(0.0, position.getAttributes().get(Position.KEY_TOTAL_DISTANCE));
position.set(Position.KEY_DISTANCE, 100);
- position = distanceHandler.handlePosition(position);
+ distanceHandler.handlePosition(position, p -> {});
assertEquals(100.0, position.getAttributes().get(Position.KEY_DISTANCE));
assertEquals(100.0, position.getAttributes().get(Position.KEY_TOTAL_DISTANCE));