Search in sources :

Example 31 with PageData

use of org.thingsboard.server.common.data.page.PageData in project thingsboard by thingsboard.

the class BaseEdgeTest method findDeviceByName.

private Device findDeviceByName(String deviceName) throws Exception {
    List<Device> edgeDevices = doGetTypedWithPageLink("/api/edge/" + edge.getUuidId() + "/devices?", new TypeReference<PageData<Device>>() {
    }, new PageLink(100)).getData();
    Optional<Device> foundDevice = edgeDevices.stream().filter(d -> d.getName().equals(deviceName)).findAny();
    Assert.assertTrue(foundDevice.isPresent());
    Device device = foundDevice.get();
    Assert.assertEquals(deviceName, device.getName());
    return device;
}
Also used : AbstractControllerTest(org.thingsboard.server.controller.AbstractControllerTest) Edge(org.thingsboard.server.common.data.edge.Edge) AlarmRule(org.thingsboard.server.common.data.device.profile.AlarmRule) AlarmConditionKeyType(org.thingsboard.server.common.data.device.profile.AlarmConditionKeyType) Autowired(org.springframework.beans.factory.annotation.Autowired) TenantId(org.thingsboard.server.common.data.id.TenantId) EntityRelation(org.thingsboard.server.common.data.relation.EntityRelation) UplinkResponseMsg(org.thingsboard.server.gen.edge.v1.UplinkResponseMsg) Map(java.util.Map) JsonConverter(org.thingsboard.server.common.transport.adaptor.JsonConverter) JsonNode(com.fasterxml.jackson.databind.JsonNode) AlarmStatus(org.thingsboard.server.common.data.alarm.AlarmStatus) EntityViewUpdateMsg(org.thingsboard.server.gen.edge.v1.EntityViewUpdateMsg) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) DeviceProfile(org.thingsboard.server.common.data.DeviceProfile) DeviceUpdateMsg(org.thingsboard.server.gen.edge.v1.DeviceUpdateMsg) PageLink(org.thingsboard.server.common.data.page.PageLink) Authority(org.thingsboard.server.common.data.security.Authority) Alarm(org.thingsboard.server.common.data.alarm.Alarm) EdgeEventActionType(org.thingsboard.server.common.data.edge.EdgeEventActionType) EntityView(org.thingsboard.server.common.data.EntityView) AdminSettingsUpdateMsg(org.thingsboard.server.gen.edge.v1.AdminSettingsUpdateMsg) TransportProtos(org.thingsboard.server.gen.transport.TransportProtos) RuleChainId(org.thingsboard.server.common.data.id.RuleChainId) UserCredentialsUpdateMsg(org.thingsboard.server.gen.edge.v1.UserCredentialsUpdateMsg) Awaitility(org.awaitility.Awaitility) EntityKeyValueType(org.thingsboard.server.common.data.query.EntityKeyValueType) DeviceCredentialsUpdateMsg(org.thingsboard.server.gen.edge.v1.DeviceCredentialsUpdateMsg) AlarmSeverity(org.thingsboard.server.common.data.alarm.AlarmSeverity) WidgetType(org.thingsboard.server.common.data.widget.WidgetType) Device(org.thingsboard.server.common.data.Device) AlarmUpdateMsg(org.thingsboard.server.gen.edge.v1.AlarmUpdateMsg) NumericFilterPredicate(org.thingsboard.server.common.data.query.NumericFilterPredicate) ArrayList(java.util.ArrayList) User(org.thingsboard.server.common.data.User) EntityIdFactory(org.thingsboard.server.common.data.id.EntityIdFactory) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) AlarmConditionFilterKey(org.thingsboard.server.common.data.device.profile.AlarmConditionFilterKey) WidgetsBundleUpdateMsg(org.thingsboard.server.gen.edge.v1.WidgetsBundleUpdateMsg) DashboardUpdateMsg(org.thingsboard.server.gen.edge.v1.DashboardUpdateMsg) Before(org.junit.Before) RpcResponseMsg(org.thingsboard.server.gen.edge.v1.RpcResponseMsg) DataConstants(org.thingsboard.server.common.data.DataConstants) FilterPredicateValue(org.thingsboard.server.common.data.query.FilterPredicateValue) RuleChainType(org.thingsboard.server.common.data.rule.RuleChainType) RuleNode(org.thingsboard.server.common.data.rule.RuleNode) RuleChainMetadataRequestMsg(org.thingsboard.server.gen.edge.v1.RuleChainMetadataRequestMsg) UserCredentialsRequestMsg(org.thingsboard.server.gen.edge.v1.UserCredentialsRequestMsg) DeviceCredentials(org.thingsboard.server.common.data.security.DeviceCredentials) AttributesRequestMsg(org.thingsboard.server.gen.edge.v1.AttributesRequestMsg) Test(org.junit.Test) EntityDataProto(org.thingsboard.server.gen.edge.v1.EntityDataProto) DeviceProfileData(org.thingsboard.server.common.data.device.profile.DeviceProfileData) RelationUpdateMsg(org.thingsboard.server.gen.edge.v1.RelationUpdateMsg) TreeMap(java.util.TreeMap) PageData(org.thingsboard.server.common.data.page.PageData) DeviceCredentialsRequestMsg(org.thingsboard.server.gen.edge.v1.DeviceCredentialsRequestMsg) EdgeEvent(org.thingsboard.server.common.data.edge.EdgeEvent) RuleChain(org.thingsboard.server.common.data.rule.RuleChain) AlarmConditionFilter(org.thingsboard.server.common.data.device.profile.AlarmConditionFilter) RelationTypeGroup(org.thingsboard.server.common.data.relation.RelationTypeGroup) Assert(org.junit.Assert) JsonObject(com.google.gson.JsonObject) DeviceProfileUpdateMsg(org.thingsboard.server.gen.edge.v1.DeviceProfileUpdateMsg) EdgeImitator(org.thingsboard.server.edge.imitator.EdgeImitator) DeviceRpcCallMsg(org.thingsboard.server.gen.edge.v1.DeviceRpcCallMsg) Customer(org.thingsboard.server.common.data.Customer) RuleChainMetaData(org.thingsboard.server.common.data.rule.RuleChainMetaData) AssetUpdateMsg(org.thingsboard.server.gen.edge.v1.AssetUpdateMsg) Random(java.util.Random) DefaultTenantProfileConfiguration(org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration) WidgetsBundle(org.thingsboard.server.common.data.widget.WidgetsBundle) Uuids(com.datastax.oss.driver.api.core.uuid.Uuids) WidgetTypeUpdateMsg(org.thingsboard.server.gen.edge.v1.WidgetTypeUpdateMsg) After(org.junit.After) AttributeDeleteMsg(org.thingsboard.server.gen.edge.v1.AttributeDeleteMsg) EntityType(org.thingsboard.server.common.data.EntityType) TypeReference(com.fasterxml.jackson.core.type.TypeReference) EdgeId(org.thingsboard.server.common.data.id.EdgeId) Dashboard(org.thingsboard.server.common.data.Dashboard) EdgeEventService(org.thingsboard.server.dao.edge.EdgeEventService) AlarmCondition(org.thingsboard.server.common.data.device.profile.AlarmCondition) UUID(java.util.UUID) AllowCreateNewDevicesDeviceProfileProvisionConfiguration(org.thingsboard.server.common.data.device.profile.AllowCreateNewDevicesDeviceProfileProvisionConfiguration) UserUpdateMsg(org.thingsboard.server.gen.edge.v1.UserUpdateMsg) RuleChainUpdateMsg(org.thingsboard.server.gen.edge.v1.RuleChainUpdateMsg) List(java.util.List) TbClusterService(org.thingsboard.server.cluster.TbClusterService) Optional(java.util.Optional) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) UpdateMsgType(org.thingsboard.server.gen.edge.v1.UpdateMsgType) EntityViewsRequestMsg(org.thingsboard.server.gen.edge.v1.EntityViewsRequestMsg) RelationRequestMsg(org.thingsboard.server.gen.edge.v1.RelationRequestMsg) JacksonUtil(org.thingsboard.common.util.JacksonUtil) Tenant(org.thingsboard.server.common.data.Tenant) RuleChainMetadataUpdateMsg(org.thingsboard.server.gen.edge.v1.RuleChainMetadataUpdateMsg) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) TenantProfile(org.thingsboard.server.common.data.TenantProfile) DeviceProfileAlarm(org.thingsboard.server.common.data.device.profile.DeviceProfileAlarm) SimpleAlarmConditionSpec(org.thingsboard.server.common.data.device.profile.SimpleAlarmConditionSpec) EntityId(org.thingsboard.server.common.data.id.EntityId) CustomerUpdateMsg(org.thingsboard.server.gen.edge.v1.CustomerUpdateMsg) AlarmInfo(org.thingsboard.server.common.data.alarm.AlarmInfo) AbstractMessage(com.google.protobuf.AbstractMessage) DeviceCredentialsType(org.thingsboard.server.common.data.security.DeviceCredentialsType) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) EdgeConfiguration(org.thingsboard.server.gen.edge.v1.EdgeConfiguration) TimeUnit(java.util.concurrent.TimeUnit) MessageLite(com.google.protobuf.MessageLite) UplinkMsg(org.thingsboard.server.gen.edge.v1.UplinkMsg) EdgeEventType(org.thingsboard.server.common.data.edge.EdgeEventType) Asset(org.thingsboard.server.common.data.asset.Asset) Device(org.thingsboard.server.common.data.Device) PageLink(org.thingsboard.server.common.data.page.PageLink) TypeReference(com.fasterxml.jackson.core.type.TypeReference)

Example 32 with PageData

use of org.thingsboard.server.common.data.page.PageData in project thingsboard by thingsboard.

the class BaseDeviceProfileControllerTest method testFindDeviceProfileInfos.

@Test
public void testFindDeviceProfileInfos() throws Exception {
    List<DeviceProfile> deviceProfiles = new ArrayList<>();
    PageLink pageLink = new PageLink(17);
    PageData<DeviceProfile> deviceProfilePageData = doGetTypedWithPageLink("/api/deviceProfiles?", new TypeReference<PageData<DeviceProfile>>() {
    }, pageLink);
    Assert.assertFalse(deviceProfilePageData.hasNext());
    Assert.assertEquals(1, deviceProfilePageData.getTotalElements());
    deviceProfiles.addAll(deviceProfilePageData.getData());
    for (int i = 0; i < 28; i++) {
        DeviceProfile deviceProfile = this.createDeviceProfile("Device Profile" + i, null);
        deviceProfiles.add(doPost("/api/deviceProfile", deviceProfile, DeviceProfile.class));
    }
    List<DeviceProfileInfo> loadedDeviceProfileInfos = new ArrayList<>();
    pageLink = new PageLink(17);
    PageData<DeviceProfileInfo> pageData;
    do {
        pageData = doGetTypedWithPageLink("/api/deviceProfileInfos?", new TypeReference<PageData<DeviceProfileInfo>>() {
        }, pageLink);
        loadedDeviceProfileInfos.addAll(pageData.getData());
        if (pageData.hasNext()) {
            pageLink = pageLink.nextPageLink();
        }
    } while (pageData.hasNext());
    Collections.sort(deviceProfiles, idComparator);
    Collections.sort(loadedDeviceProfileInfos, deviceProfileInfoIdComparator);
    List<DeviceProfileInfo> deviceProfileInfos = deviceProfiles.stream().map(deviceProfile -> new DeviceProfileInfo(deviceProfile.getId(), deviceProfile.getName(), deviceProfile.getImage(), deviceProfile.getDefaultDashboardId(), deviceProfile.getType(), deviceProfile.getTransportType())).collect(Collectors.toList());
    Assert.assertEquals(deviceProfileInfos, loadedDeviceProfileInfos);
    for (DeviceProfile deviceProfile : deviceProfiles) {
        if (!deviceProfile.isDefault()) {
            doDelete("/api/deviceProfile/" + deviceProfile.getId().getId().toString()).andExpect(status().isOk());
        }
    }
    pageLink = new PageLink(17);
    pageData = doGetTypedWithPageLink("/api/deviceProfileInfos?", new TypeReference<PageData<DeviceProfileInfo>>() {
    }, pageLink);
    Assert.assertFalse(pageData.hasNext());
    Assert.assertEquals(1, pageData.getTotalElements());
}
Also used : DeviceProfileType(org.thingsboard.server.common.data.DeviceProfileType) DynamicMessage(com.google.protobuf.DynamicMessage) Descriptors(com.google.protobuf.Descriptors) Device(org.thingsboard.server.common.data.Device) Tenant(org.thingsboard.server.common.data.Tenant) ArrayList(java.util.ArrayList) User(org.thingsboard.server.common.data.User) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) After(org.junit.After) DeviceTransportType(org.thingsboard.server.common.data.DeviceTransportType) TypeReference(com.fasterxml.jackson.core.type.TypeReference) DeviceProfileProvisionType(org.thingsboard.server.common.data.DeviceProfileProvisionType) Before(org.junit.Before) DeviceProfileInfo(org.thingsboard.server.common.data.DeviceProfileInfo) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) DeviceProfile(org.thingsboard.server.common.data.DeviceProfile) ProtoFileElement(com.squareup.wire.schema.internal.parser.ProtoFileElement) PageLink(org.thingsboard.server.common.data.page.PageLink) Assert.assertNotNull(org.junit.Assert.assertNotNull) Set(java.util.Set) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) ProtoTransportPayloadConfiguration(org.thingsboard.server.common.data.device.profile.ProtoTransportPayloadConfiguration) Authority(org.thingsboard.server.common.data.security.Authority) Collectors(java.util.stream.Collectors) List(java.util.List) JsonFormat(com.google.protobuf.util.JsonFormat) Ignore(org.junit.Ignore) DynamicSchema(com.github.os72.protobuf.dynamic.DynamicSchema) PageData(org.thingsboard.server.common.data.page.PageData) DeviceProfileTransportConfiguration(org.thingsboard.server.common.data.device.profile.DeviceProfileTransportConfiguration) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) Assert(org.junit.Assert) MqttDeviceProfileTransportConfiguration(org.thingsboard.server.common.data.device.profile.MqttDeviceProfileTransportConfiguration) TransportPayloadTypeConfiguration(org.thingsboard.server.common.data.device.profile.TransportPayloadTypeConfiguration) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) Assert.assertEquals(org.junit.Assert.assertEquals) DeviceProfileInfo(org.thingsboard.server.common.data.DeviceProfileInfo) ArrayList(java.util.ArrayList) DeviceProfile(org.thingsboard.server.common.data.DeviceProfile) PageData(org.thingsboard.server.common.data.page.PageData) PageLink(org.thingsboard.server.common.data.page.PageLink) TypeReference(com.fasterxml.jackson.core.type.TypeReference) Test(org.junit.Test)

Example 33 with PageData

use of org.thingsboard.server.common.data.page.PageData in project thingsboard by thingsboard.

the class BaseEntityViewControllerTest method testGetCustomerEntityViewsByName.

@Test
public void testGetCustomerEntityViewsByName() throws Exception {
    CustomerId customerId = doPost("/api/customer", getNewCustomer("Test customer"), Customer.class).getId();
    String urlTemplate = "/api/customer/" + customerId.getId().toString() + "/entityViews?";
    String name1 = "Entity view name1";
    List<EntityView> namesOfView1 = fillListOf(125, name1, "/api/customer/" + customerId.getId().toString() + "/entityView/");
    List<EntityView> loadedNamesOfView1 = loadListOf(new PageLink(15, 0, name1), urlTemplate);
    Collections.sort(namesOfView1, idComparator);
    Collections.sort(loadedNamesOfView1, idComparator);
    assertEquals(namesOfView1, loadedNamesOfView1);
    String name2 = "Entity view name2";
    List<EntityView> NamesOfView2 = fillListOf(143, name2, "/api/customer/" + customerId.getId().toString() + "/entityView/");
    List<EntityView> loadedNamesOfView2 = loadListOf(new PageLink(4, 0, name2), urlTemplate);
    Collections.sort(NamesOfView2, idComparator);
    Collections.sort(loadedNamesOfView2, idComparator);
    assertEquals(NamesOfView2, loadedNamesOfView2);
    for (EntityView view : loadedNamesOfView1) {
        doDelete("/api/customer/entityView/" + view.getId().getId().toString()).andExpect(status().isOk());
    }
    PageData<EntityView> pageData = doGetTypedWithPageLink(urlTemplate, new TypeReference<PageData<EntityView>>() {
    }, new PageLink(4, 0, name1));
    Assert.assertFalse(pageData.hasNext());
    assertEquals(0, pageData.getData().size());
    for (EntityView view : loadedNamesOfView2) {
        doDelete("/api/customer/entityView/" + view.getId().getId().toString()).andExpect(status().isOk());
    }
    pageData = doGetTypedWithPageLink(urlTemplate, new TypeReference<PageData<EntityView>>() {
    }, new PageLink(4, 0, name2));
    Assert.assertFalse(pageData.hasNext());
    assertEquals(0, pageData.getData().size());
}
Also used : PageData(org.thingsboard.server.common.data.page.PageData) Customer(org.thingsboard.server.common.data.Customer) AttributesEntityView(org.thingsboard.server.common.data.objects.AttributesEntityView) TelemetryEntityView(org.thingsboard.server.common.data.objects.TelemetryEntityView) EntityView(org.thingsboard.server.common.data.EntityView) PageLink(org.thingsboard.server.common.data.page.PageLink) CustomerId(org.thingsboard.server.common.data.id.CustomerId) Matchers.containsString(org.hamcrest.Matchers.containsString) TypeReference(com.fasterxml.jackson.core.type.TypeReference) Test(org.junit.Test)

Example 34 with PageData

use of org.thingsboard.server.common.data.page.PageData in project thingsboard by thingsboard.

the class BaseEntityViewControllerTest method testAssignEntityViewToEdge.

@Test
public void testAssignEntityViewToEdge() throws Exception {
    Edge edge = constructEdge("My edge", "default");
    Edge savedEdge = doPost("/api/edge", edge, Edge.class);
    EntityView savedEntityView = getNewSavedEntityView("My entityView");
    doPost("/api/edge/" + savedEdge.getId().getId().toString() + "/device/" + testDevice.getId().getId().toString(), Device.class);
    doPost("/api/edge/" + savedEdge.getId().getId().toString() + "/entityView/" + savedEntityView.getId().getId().toString(), EntityView.class);
    PageData<EntityView> pageData = doGetTypedWithPageLink("/api/edge/" + savedEdge.getId().getId().toString() + "/entityViews?", new TypeReference<PageData<EntityView>>() {
    }, new PageLink(100));
    Assert.assertEquals(1, pageData.getData().size());
    doDelete("/api/edge/" + savedEdge.getId().getId().toString() + "/entityView/" + savedEntityView.getId().getId().toString(), EntityView.class);
    pageData = doGetTypedWithPageLink("/api/edge/" + savedEdge.getId().getId().toString() + "/entityViews?", new TypeReference<PageData<EntityView>>() {
    }, new PageLink(100));
    Assert.assertEquals(0, pageData.getData().size());
}
Also used : PageData(org.thingsboard.server.common.data.page.PageData) AttributesEntityView(org.thingsboard.server.common.data.objects.AttributesEntityView) TelemetryEntityView(org.thingsboard.server.common.data.objects.TelemetryEntityView) EntityView(org.thingsboard.server.common.data.EntityView) PageLink(org.thingsboard.server.common.data.page.PageLink) TypeReference(com.fasterxml.jackson.core.type.TypeReference) Edge(org.thingsboard.server.common.data.edge.Edge) Test(org.junit.Test)

Example 35 with PageData

use of org.thingsboard.server.common.data.page.PageData in project thingsboard by thingsboard.

the class BaseTenantProfileControllerTest method testFindTenantProfileInfos.

@Test
public void testFindTenantProfileInfos() throws Exception {
    loginSysAdmin();
    List<TenantProfile> tenantProfiles = new ArrayList<>();
    PageLink pageLink = new PageLink(17);
    PageData<TenantProfile> tenantProfilePageData = doGetTypedWithPageLink("/api/tenantProfiles?", new TypeReference<PageData<TenantProfile>>() {
    }, pageLink);
    Assert.assertFalse(tenantProfilePageData.hasNext());
    Assert.assertEquals(1, tenantProfilePageData.getTotalElements());
    tenantProfiles.addAll(tenantProfilePageData.getData());
    for (int i = 0; i < 28; i++) {
        TenantProfile tenantProfile = this.createTenantProfile("Tenant Profile" + i);
        tenantProfiles.add(doPost("/api/tenantProfile", tenantProfile, TenantProfile.class));
    }
    List<EntityInfo> loadedTenantProfileInfos = new ArrayList<>();
    pageLink = new PageLink(17);
    PageData<EntityInfo> pageData;
    do {
        pageData = doGetTypedWithPageLink("/api/tenantProfileInfos?", new TypeReference<PageData<EntityInfo>>() {
        }, pageLink);
        loadedTenantProfileInfos.addAll(pageData.getData());
        if (pageData.hasNext()) {
            pageLink = pageLink.nextPageLink();
        }
    } while (pageData.hasNext());
    Collections.sort(tenantProfiles, idComparator);
    Collections.sort(loadedTenantProfileInfos, tenantProfileInfoIdComparator);
    List<EntityInfo> tenantProfileInfos = tenantProfiles.stream().map(tenantProfile -> new EntityInfo(tenantProfile.getId(), tenantProfile.getName())).collect(Collectors.toList());
    Assert.assertEquals(tenantProfileInfos, loadedTenantProfileInfos);
    for (TenantProfile tenantProfile : tenantProfiles) {
        if (!tenantProfile.isDefault()) {
            doDelete("/api/tenantProfile/" + tenantProfile.getId().getId().toString()).andExpect(status().isOk());
        }
    }
    pageLink = new PageLink(17);
    pageData = doGetTypedWithPageLink("/api/tenantProfileInfos?", new TypeReference<PageData<EntityInfo>>() {
    }, pageLink);
    Assert.assertFalse(pageData.hasNext());
    Assert.assertEquals(1, pageData.getTotalElements());
}
Also used : EntityInfo(org.thingsboard.server.common.data.EntityInfo) PageLink(org.thingsboard.server.common.data.page.PageLink) TenantProfileData(org.thingsboard.server.common.data.tenant.profile.TenantProfileData) Autowired(org.springframework.beans.factory.annotation.Autowired) Tenant(org.thingsboard.server.common.data.Tenant) Test(org.junit.Test) DefaultTenantProfileConfiguration(org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration) Collectors(java.util.stream.Collectors) TenantId(org.thingsboard.server.common.data.id.TenantId) ArrayList(java.util.ArrayList) List(java.util.List) TenantProfile(org.thingsboard.server.common.data.TenantProfile) MockMvcResultMatchers.status(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status) After(org.junit.After) PageData(org.thingsboard.server.common.data.page.PageData) TenantProfileService(org.thingsboard.server.dao.tenant.TenantProfileService) RandomStringUtils(org.apache.commons.lang3.RandomStringUtils) TypeReference(com.fasterxml.jackson.core.type.TypeReference) Assert(org.junit.Assert) Collections(java.util.Collections) Matchers.containsString(org.hamcrest.Matchers.containsString) ArrayList(java.util.ArrayList) PageData(org.thingsboard.server.common.data.page.PageData) EntityInfo(org.thingsboard.server.common.data.EntityInfo) PageLink(org.thingsboard.server.common.data.page.PageLink) TenantProfile(org.thingsboard.server.common.data.TenantProfile) TypeReference(com.fasterxml.jackson.core.type.TypeReference) Test(org.junit.Test)

Aggregations

PageData (org.thingsboard.server.common.data.page.PageData)43 Test (org.junit.Test)31 ArrayList (java.util.ArrayList)28 List (java.util.List)28 Tenant (org.thingsboard.server.common.data.Tenant)26 PageLink (org.thingsboard.server.common.data.page.PageLink)25 Collectors (java.util.stream.Collectors)24 Edge (org.thingsboard.server.common.data.edge.Edge)23 TenantId (org.thingsboard.server.common.data.id.TenantId)23 After (org.junit.After)21 Assert (org.junit.Assert)21 Device (org.thingsboard.server.common.data.Device)21 EntityType (org.thingsboard.server.common.data.EntityType)21 Collections (java.util.Collections)20 EdgeId (org.thingsboard.server.common.data.id.EdgeId)20 Before (org.junit.Before)19 Autowired (org.springframework.beans.factory.annotation.Autowired)19 DataConstants (org.thingsboard.server.common.data.DataConstants)19 EntityId (org.thingsboard.server.common.data.id.EntityId)19 Slf4j (lombok.extern.slf4j.Slf4j)18