From 71af93eb4a8c92ef55e041abba8aa2e6efb7f1bd Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 7 Nov 2022 18:59:27 +0200 Subject: [PATCH] fixed test --- .../thingsboard/server/msa/prototypes/DevicePrototypes.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/prototypes/DevicePrototypes.java b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/prototypes/DevicePrototypes.java index a9fc2f55e9..7db35460a9 100644 --- a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/prototypes/DevicePrototypes.java +++ b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/prototypes/DevicePrototypes.java @@ -15,9 +15,7 @@ */ package org.thingsboard.server.msa.prototypes; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils; import org.thingsboard.common.util.JacksonUtil; import org.thingsboard.server.common.data.Device; @@ -32,7 +30,7 @@ public class DevicePrototypes { public static Device defaultGatewayPrototype() { String isGateway = "{\"gateway\":true}"; - JsonNode additionalInfo = JacksonUtil.valueToTree(isGateway); + JsonNode additionalInfo = JacksonUtil.toJsonNode(isGateway); Device gatewayDeviceTemplate = new Device(); gatewayDeviceTemplate.setName("mqtt_gateway_" + RandomStringUtils.randomAlphanumeric(5)); gatewayDeviceTemplate.setType("gateway");