aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r--test/org/traccar/ProtocolTest.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java
index 94c5edb9f..c9d4ceeb2 100644
--- a/test/org/traccar/ProtocolTest.java
+++ b/test/org/traccar/ProtocolTest.java
@@ -197,9 +197,8 @@ public class ProtocolTest extends BaseTest {
}
if (attributes.containsKey(Position.KEY_BATTERY_LEVEL)) {
- Object batteryLevel = attributes.get(Position.KEY_BATTERY_LEVEL);
- Assert.assertTrue(batteryLevel instanceof Number);
- Assert.assertTrue(((Number) batteryLevel).intValue() <=100 && ((Number) batteryLevel).intValue() >= 0);
+ int batteryLevel = ((Number) attributes.get(Position.KEY_BATTERY_LEVEL)).intValue();
+ Assert.assertTrue(batteryLevel <= 100 && batteryLevel >= 0);
}
if (position.getNetwork() != null && position.getNetwork().getCellTowers() != null) {