|
@@ -26,7 +26,7 @@ import com.google.protobuf.AbstractMessage; |
|
@@ -26,7 +26,7 @@ import com.google.protobuf.AbstractMessage; |
26
|
import com.google.protobuf.InvalidProtocolBufferException;
|
26
|
import com.google.protobuf.InvalidProtocolBufferException;
|
27
|
import com.google.protobuf.MessageLite;
|
27
|
import com.google.protobuf.MessageLite;
|
28
|
import lombok.extern.slf4j.Slf4j;
|
28
|
import lombok.extern.slf4j.Slf4j;
|
29
|
-import org.apache.commons.lang.RandomStringUtils;
|
29
|
+import org.apache.commons.lang3.RandomStringUtils;
|
30
|
import org.junit.After;
|
30
|
import org.junit.After;
|
31
|
import org.junit.Assert;
|
31
|
import org.junit.Assert;
|
32
|
import org.junit.Before;
|
32
|
import org.junit.Before;
|
|
@@ -1216,12 +1216,12 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { |
|
@@ -1216,12 +1216,12 @@ abstract public class BaseEdgeTest extends AbstractControllerTest { |
1216
|
|
1216
|
|
1217
|
// Wait before device attributes saved to database before requesting them from controller
|
1217
|
// Wait before device attributes saved to database before requesting them from controller
|
1218
|
Thread.sleep(1000);
|
1218
|
Thread.sleep(1000);
|
1219
|
- Map<String, List<Map<String, String>>> timeseries = doGetAsync("/api/plugins/telemetry/DEVICE/" + device.getUuidId() + "/values/timeseries?keys=" + timeseriesKey, Map.class);
|
1219
|
+ Map<String, List<Map<String, String>>> timeseries = doGetAsyncTyped("/api/plugins/telemetry/DEVICE/" + device.getUuidId() + "/values/timeseries?keys=" + timeseriesKey, new TypeReference<>() {});
|
1220
|
Assert.assertTrue(timeseries.containsKey(timeseriesKey));
|
1220
|
Assert.assertTrue(timeseries.containsKey(timeseriesKey));
|
1221
|
Assert.assertEquals(1, timeseries.get(timeseriesKey).size());
|
1221
|
Assert.assertEquals(1, timeseries.get(timeseriesKey).size());
|
1222
|
Assert.assertEquals(timeseriesValue, timeseries.get(timeseriesKey).get(0).get("value"));
|
1222
|
Assert.assertEquals(timeseriesValue, timeseries.get(timeseriesKey).get(0).get("value"));
|
1223
|
|
1223
|
|
1224
|
- List<Map<String, String>> attributes = doGetAsync("/api/plugins/telemetry/DEVICE/" + device.getId() + "/values/attributes/" + DataConstants.SERVER_SCOPE, List.class);
|
1224
|
+ List<Map<String, String>> attributes = doGetAsyncTyped("/api/plugins/telemetry/DEVICE/" + device.getId() + "/values/attributes/" + DataConstants.SERVER_SCOPE, new TypeReference<>() {});
|
1225
|
Assert.assertEquals(1, attributes.size());
|
1225
|
Assert.assertEquals(1, attributes.size());
|
1226
|
Assert.assertEquals(attributes.get(0).get("key"), attributesKey);
|
1226
|
Assert.assertEquals(attributes.get(0).get("key"), attributesKey);
|
1227
|
Assert.assertEquals(attributes.get(0).get("value"), attributesValue);
|
1227
|
Assert.assertEquals(attributes.get(0).get("value"), attributesValue);
|