diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
index f417ca5943f..8d2811cb798 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.annotations/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.annotations
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - API Management Annotations
WSO2 Carbon - API Management Custom Annotation Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
index 029e05ce440..8f71d3ee434 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml
@@ -21,12 +21,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
org.wso2.carbon.apimgt.application.extension.api
war
WSO2 Carbon - API Application Management API
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
index 5ebee576ab9..88977fd9071 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml
@@ -22,12 +22,12 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
org.wso2.carbon.apimgt.application.extension
bundle
WSO2 Carbon - API Application Management
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
index 29580960c50..0f1c734405b 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml
@@ -21,13 +21,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handlers
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - API Security Handler Component
WSO2 Carbon - API Management Security Handler Module
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
index 05694f612bd..2653de22630 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
index dc04d5b510d..b1c4df08218 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.generated.client/pom.xml
@@ -13,13 +13,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.generated.client
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - API Management Integration Generated Client
WSO2 Carbon - API Management Integration Client
diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
index 717af702325..247c76e7d37 100644
--- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
+++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml
@@ -22,13 +22,13 @@
apimgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - API Management Webapp Publisher
WSO2 Carbon - API Management Webapp Publisher
diff --git a/components/apimgt-extensions/pom.xml b/components/apimgt-extensions/pom.xml
index 8e0dcce6a07..a0015b4b1d5 100644
--- a/components/apimgt-extensions/pom.xml
+++ b/components/apimgt-extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
apimgt-extensions
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Component
http://wso2.org
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
index c80643c6eb4..30e54c87de9 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
index 2d21a173503..be690202f89 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml
@@ -22,7 +22,7 @@
certificate-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
index 37439ad6e9e..73bf6504a4f 100644
--- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
+++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml
@@ -21,13 +21,13 @@
org.wso2.carbon.devicemgt
certificate-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.core
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Certificate Management Core
WSO2 Carbon - Certificate Management Core
diff --git a/components/certificate-mgt/pom.xml b/components/certificate-mgt/pom.xml
index 844e27a72cc..6b5bad98fb1 100644
--- a/components/certificate-mgt/pom.xml
+++ b/components/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Component
http://wso2.org
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
index b4eca144d34..1b0dac167ad 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
index 3d2b3ec43e4..90365365d2d 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
index 9432912d4db..1c1d7d31078 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
index b437be83b97..b51752becc2 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
index cbd8953f822..04f2bd52549 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
index 1b3afce72c5..2acb112ec5f 100644
--- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
+++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml
@@ -22,7 +22,7 @@
device-mgt-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt-extensions/pom.xml b/components/device-mgt-extensions/pom.xml
index 34bdd613c1f..cf9e033a027 100644
--- a/components/device-mgt-extensions/pom.xml
+++ b/components/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
index 81e510e8b10..25db3fbcdba 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
index 7dbc95f24bf..7270d4fcc1e 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
new file mode 100644
index 00000000000..6c222e83114
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceAgentServiceTest.java
@@ -0,0 +1,655 @@
+/*
+ * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+ *
+ * WSO2 Inc. licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License.
+ * you may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.wso2.carbon.device.mgt.jaxrs.service.impl;
+
+import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mockito.Mockito;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor;
+import org.testng.Assert;
+import org.testng.IObjectFactory;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.ObjectFactory;
+import org.testng.annotations.Test;
+import org.wso2.carbon.caching.impl.CacheImpl;
+import org.wso2.carbon.context.CarbonContext;
+import org.wso2.carbon.context.PrivilegedCarbonContext;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherService;
+import org.wso2.carbon.device.mgt.analytics.data.publisher.service.EventsPublisherServiceImpl;
+import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
+import org.wso2.carbon.device.mgt.common.DeviceManagementException;
+import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
+import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
+import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
+import org.wso2.carbon.device.mgt.core.authorization.DeviceAccessAuthorizationServiceImpl;
+import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
+import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl;
+import org.wso2.carbon.device.mgt.jaxrs.service.api.DeviceAgentService;
+import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceTypeManagementAdminService;
+import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.DeviceMgtAPITestHelper;
+import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
+import org.wso2.carbon.event.stream.stub.EventStreamAdminServiceStub;
+import org.wso2.carbon.event.stream.stub.types.EventStreamAttributeDto;
+import org.wso2.carbon.event.stream.stub.types.EventStreamDefinitionDto;
+import org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException;
+import org.wso2.carbon.user.api.UserStoreException;
+import org.wso2.carbon.utils.CarbonUtils;
+
+import javax.cache.CacheManager;
+import javax.ws.rs.core.Response;
+import java.rmi.RemoteException;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.mockito.MockitoAnnotations.initMocks;
+
+/**
+ * This class holds the unit tests for the class {@link DeviceAgentServiceImpl}
+ */
+@PowerMockIgnore("javax.ws.rs.*")
+@SuppressStaticInitializationFor({"org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils",
+ "org.wso2.carbon.context.CarbonContext", "org.wso2.carbon.context.internal.CarbonContextDataHolder"})
+@PrepareForTest({DeviceMgtAPIUtils.class, DeviceManagementProviderService.class,
+ DeviceAccessAuthorizationService.class, EventStreamAdminServiceStub.class, PrivilegedCarbonContext.class,
+ CarbonContext.class, CarbonUtils.class})
+public class DeviceAgentServiceTest {
+
+ private static final Log log = LogFactory.getLog(DeviceTypeManagementAdminService.class);
+ private DeviceManagementProviderService deviceManagementProviderService;
+ private DeviceAgentService deviceAgentService;
+ private EventStreamAdminServiceStub eventStreamAdminServiceStub;
+ private PrivilegedCarbonContext privilegedCarbonContext;
+ private CarbonContext carbonContext;
+ private CacheManager cacheManager;
+ private DeviceAccessAuthorizationService deviceAccessAuthorizationService;
+ private static final String TEST_DEVICE_TYPE = "TEST-DEVICE-TYPE";
+ private static final String TEST_DEVICE_IDENTIFIER = "11222334455";
+ private static final String AUTHENTICATED_USER = "admin";
+ private static final String TENANT_DOMAIN = "carbon.super";
+ private static Device demoDevice;
+
+ @ObjectFactory
+ public IObjectFactory getObjectFactory() {
+ return new org.powermock.modules.testng.PowerMockObjectFactory();
+ }
+
+ @BeforeClass
+ public void init() {
+ log.info("Initializing DeviceAgent tests");
+ initMocks(this);
+ this.deviceManagementProviderService = Mockito
+ .mock(DeviceManagementProviderServiceImpl.class, Mockito.RETURNS_MOCKS);
+ this.deviceAgentService = new DeviceAgentServiceImpl();
+ this.deviceAccessAuthorizationService = Mockito.mock(DeviceAccessAuthorizationServiceImpl.class,
+ Mockito.RETURNS_MOCKS);
+ this.privilegedCarbonContext = Mockito.mock(PrivilegedCarbonContext.class, Mockito.RETURNS_MOCKS);
+ this.carbonContext = Mockito.mock(CarbonContext.class, Mockito.RETURNS_MOCKS);
+ this.eventStreamAdminServiceStub = Mockito.mock(EventStreamAdminServiceStub.class, Mockito.RETURNS_MOCKS);
+ demoDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ this.cacheManager = Mockito.mock(CacheManager.class, Mockito.RETURNS_MOCKS);
+ }
+
+ @Test(description = "Test device Enrollment when the device is null")
+ public void testEnrollDeviceWithDeviceIsNULL() {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Response response = this.deviceAgentService.enrollDevice(null);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ }
+
+ @Test(description = "Test device enrollment when device type is null.")
+ public void testEnrollDeviceWithDeviceTypeNull() {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Device device = DeviceMgtAPITestHelper.generateDummyDevice(null, TEST_DEVICE_IDENTIFIER);
+ Response response = this.deviceAgentService.enrollDevice(device);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ }
+
+ @Test(description = "Test device enrollment of a device with null device identifier.")
+ public void testEnrollNewDeviceWithDeviceIdentifierIsNull() {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Device device = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, null);
+ Response response = this.deviceAgentService.enrollDevice(device);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ }
+
+ @Test(description = "Test an already enrolled device")
+ public void testEnrollExistingDevice() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(demoDevice);
+ Device device = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(device);
+ Response response = this.deviceAgentService.enrollDevice(device);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test the device enrollment success scenario.")
+ public void testEnrollDeviceSuccess() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getAuthenticatedUser"))
+ .toReturn(AUTHENTICATED_USER);
+
+ EnrolmentInfo enrolmentInfo = demoDevice.getEnrolmentInfo();
+ enrolmentInfo.setStatus(EnrolmentInfo.Status.INACTIVE);
+ demoDevice.setEnrolmentInfo(enrolmentInfo);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(demoDevice);
+
+ Response response = this.deviceAgentService.enrollDevice(demoDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
+ "The response status should be 200");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test the device enrollment with device management exception.")
+ public void testEnrollDeviceWithException() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getAuthenticatedUser"))
+ .toReturn(AUTHENTICATED_USER);
+
+ Device device = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ EnrolmentInfo enrolmentInfo = device.getEnrolmentInfo();
+ enrolmentInfo.setStatus(EnrolmentInfo.Status.INACTIVE);
+ device.setEnrolmentInfo(enrolmentInfo);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(device);
+ Mockito.when(this.deviceManagementProviderService.enrollDevice(Mockito.any()))
+ .thenThrow(new DeviceManagementException());
+
+ Response response = this.deviceAgentService.enrollDevice(device);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test dis-enrolling the device success scenario.")
+ public void testDisEnrollDeviceSuccess() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Mockito.when(this.deviceManagementProviderService.disenrollDevice(Mockito.any())).thenReturn(true);
+ Response response = deviceAgentService.disEnrollDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
+ "The response status should be 200");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test dis-enrolling non existing device.")
+ public void testDisEnrollNonExistingDevice() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Response response = deviceAgentService.disEnrollDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.NO_CONTENT.getStatusCode(),
+ "The response status should be 204");
+ }
+
+ @Test(description = "Test dis-enrolling device error")
+ public void testDisEnrollingDeviceError() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Mockito.when(this.deviceManagementProviderService.disenrollDevice(Mockito.any())).thenThrow(new
+ DeviceManagementException());
+ Response response = deviceAgentService.disEnrollDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test device update scenario with device management exception.")
+ public void testUpdateDeviceDMException() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenThrow(new
+ DeviceManagementException());
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test update device scenario when the device is null.")
+ public void testUpdateDeviceWithNoDevice() {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, null);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ }
+
+ @Test(description = "Test the update device scenario when there is no enrolled device.")
+ public void testUpdatingNonExistingDevice() throws DeviceManagementException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(null);
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.NOT_FOUND.getStatusCode(),
+ "The response status should be 404");
+ Mockito.reset(this.deviceManagementProviderService);
+ }
+
+ @Test(description = "Test update device with device access authorization exception.")
+ public void testEnrollDeviceWithDeviceAccessAuthException() throws DeviceManagementException,
+ DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(testDevice);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenThrow(new DeviceAccessAuthorizationException());
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceManagementProviderService);
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test(description = "Test update device when user does not have device access permission.")
+ public void testUpdateDeviceWithNoDeviceAccessPermission() throws DeviceManagementException,
+ DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(testDevice);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(false);
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.UNAUTHORIZED.getStatusCode(),
+ "The response status should be 401");
+ Mockito.reset(this.deviceManagementProviderService);
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test(description = "Test update device when device modification is unsuccessful.")
+ public void testUpdateDeviceNOTModify() throws DeviceManagementException, DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getAuthenticatedUser")).toReturn(AUTHENTICATED_USER);
+
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(testDevice);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ Mockito.when(this.deviceManagementProviderService.modifyEnrollment(Mockito.any())).thenReturn(false);
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.NOT_MODIFIED.getStatusCode(),
+ "The response status should be 304");
+ Mockito.reset(this.deviceManagementProviderService);
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test(description = "Test updating device when modify enrollment throws exception")
+ public void testUpdateDeviceWithModifyEnrollmentFailure() throws DeviceManagementException, DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getAuthenticatedUser")).toReturn(AUTHENTICATED_USER);
+
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(testDevice);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ Mockito.when(this.deviceManagementProviderService.modifyEnrollment(Mockito.any())).thenThrow(new DeviceManagementException());
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceManagementProviderService);
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+ @Test(description = "Test updating device success scenario.")
+ public void testUpdateDeviceSuccess() throws DeviceManagementException, DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceManagementService"))
+ .toReturn(this.deviceManagementProviderService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getAuthenticatedUser")).toReturn(AUTHENTICATED_USER);
+
+ Device testDevice = DeviceMgtAPITestHelper.generateDummyDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+
+ Mockito.when(this.deviceManagementProviderService.getDevice(Mockito.any())).thenReturn(testDevice);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ Mockito.when(this.deviceManagementProviderService.modifyEnrollment(Mockito.any())).thenReturn((true));
+ Response response = deviceAgentService.updateDevice(TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER, testDevice);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.ACCEPTED.getStatusCode(),
+ "The response status should be 202");
+ Mockito.reset(this.deviceManagementProviderService);
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test(description = "Test publish events with null payload.")
+ public void testPublishEventsWithNullPayload() {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ Mockito.when(this.privilegedCarbonContext.getTenantDomain()).thenReturn(TENANT_DOMAIN);
+
+ Map payload = null;
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ }
+
+ @Test(description = "Test publish events with no device access authorization.")
+ public void testPublishEventsWithOutAuthorization() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(false);
+ Mockito.when(this.privilegedCarbonContext.getTenantDomain()).thenReturn(TENANT_DOMAIN);
+ Map payload = new HashMap<>();
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.UNAUTHORIZED.getStatusCode(),
+ "The response status should be 401");
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test
+ public void testPublishEventsWithDeviceAccessAuthException() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceAccessAuthorizationService"))
+ .toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenThrow(new DeviceAccessAuthorizationException());
+ Mockito.when(this.privilegedCarbonContext.getTenantDomain()).thenReturn(TENANT_DOMAIN);
+ Map payload = new HashMap<>();
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ Mockito.reset(this.deviceAccessAuthorizationService);
+ }
+
+ @Test(description = "Test event publishing when the event stream dao is null.")
+ public void testEventPublishWithNullEventAttributesAndNullEventStreamDefDAO() throws DeviceAccessAuthorizationException, RemoteException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDeviceAccessAuthorizationService"))
+ .toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toReturn(this.eventStreamAdminServiceStub);
+ Mockito.when(this.eventStreamAdminServiceStub.getStreamDefinitionDto(Mockito.anyString())).thenReturn(null);
+
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.BAD_REQUEST.getStatusCode(),
+ "The response status should be 400");
+ Mockito.reset(eventStreamAdminServiceStub);
+ }
+
+ @Test(description ="Test the error scenario of Publishing Events with null event attributes.")
+ public void testEventPublishWithEventAttributesNULLAndPublishEventsFailure() throws
+ DeviceAccessAuthorizationException, RemoteException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toReturn(this.eventStreamAdminServiceStub);
+ EventStreamAttributeDto eventStreamAttributeDto = Mockito.mock(EventStreamAttributeDto.class,
+ Mockito.RETURNS_MOCKS);
+ EventStreamDefinitionDto eventStreamDefinitionDto = Mockito.mock(EventStreamDefinitionDto.class,
+ Mockito.RETURNS_MOCKS);
+ Mockito.when(this.eventStreamAdminServiceStub.getStreamDefinitionDto(Mockito.anyString()))
+ .thenReturn(eventStreamDefinitionDto);
+ Mockito.when(eventStreamDefinitionDto.getPayloadData()).thenReturn(new EventStreamAttributeDto[]{});
+ EventsPublisherService eventPublisherService = Mockito.mock(EventsPublisherServiceImpl.class,
+ Mockito.RETURNS_MOCKS);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventPublisherService")).toReturn
+ (eventPublisherService);
+
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+
+ @Test(description = "Test Event publishing success scenario.")
+ public void testEventPublishWithEventAttributesNULLAndPublishEventsSuccess()
+ throws DeviceAccessAuthorizationException, RemoteException, DataPublisherConfigurationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toReturn(this.eventStreamAdminServiceStub);
+ EventStreamAttributeDto eventStreamAttributeDto = Mockito.mock(EventStreamAttributeDto.class,
+ Mockito.RETURNS_MOCKS);
+ EventStreamDefinitionDto eventStreamDefinitionDto = Mockito.mock(EventStreamDefinitionDto.class,
+ Mockito.RETURNS_MOCKS);
+ Mockito.when(this.eventStreamAdminServiceStub.getStreamDefinitionDto(Mockito.anyString()))
+ .thenReturn(eventStreamDefinitionDto);
+ Mockito.when(eventStreamDefinitionDto.getPayloadData()).thenReturn(new EventStreamAttributeDto[]{});
+ EventsPublisherService eventPublisherService = Mockito.mock(EventsPublisherServiceImpl.class,
+ Mockito.RETURNS_MOCKS);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventPublisherService")).toReturn
+ (eventPublisherService);
+ Mockito.when(eventPublisherService.publishEvent(Mockito.anyString(), Mockito.anyString(), Mockito.any(),
+ Mockito.any(), Mockito.any())).thenReturn(true);
+
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode(),
+ "The response status should be 200");
+ }
+
+ @Test(description = "Test event publishing when PublishEvents throws DataPublisherConfigurationException.")
+ public void testPublishEventsDataPublisherConfig() throws DeviceAccessAuthorizationException, RemoteException, DataPublisherConfigurationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toReturn(this.eventStreamAdminServiceStub);
+ EventStreamAttributeDto eventStreamAttributeDto = Mockito.mock(EventStreamAttributeDto.class,
+ Mockito.RETURNS_MOCKS);
+ EventStreamDefinitionDto eventStreamDefinitionDto = Mockito.mock(EventStreamDefinitionDto.class,
+ Mockito.RETURNS_MOCKS);
+ Mockito.when(this.eventStreamAdminServiceStub.getStreamDefinitionDto(Mockito.anyString()))
+ .thenReturn(eventStreamDefinitionDto);
+ Mockito.when(eventStreamDefinitionDto.getPayloadData()).thenReturn(new EventStreamAttributeDto[]{});
+ EventsPublisherService eventPublisherService = Mockito.mock(EventsPublisherServiceImpl.class,
+ Mockito.RETURNS_MOCKS);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventPublisherService"))
+ .toReturn(eventPublisherService);
+ Mockito.when(eventPublisherService.publishEvent(Mockito.anyString(), Mockito.anyString(), Mockito.any(),
+ Mockito.any(), Mockito.any())).thenThrow(
+ new DataPublisherConfigurationException("meta data[0] should have the device Id field"));
+
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+
+ @Test(description = "Test Publish events with Axis Fault.")
+ public void testPublishEventsWithAxisFault() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toThrow(new AxisFault(""));
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+
+ @Test(description = "Test Publishing events when EventStreamAdminService throws Remote exception.")
+ public void testPublishEventsWithRemoteException() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toThrow(new RemoteException());
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+
+ @Test(description = "Test Publishing events when EventStreamAdminService throws JWT exception.")
+ public void testPublishEventsWithJWTException() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toThrow(new JWTClientException());
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+
+ @Test(description = "Test Publishing events when EventStreamAdminService throws User Store exception.")
+ public void testPublishEventsWithUserStoreException() throws DeviceAccessAuthorizationException {
+ PowerMockito.stub(PowerMockito.method(PrivilegedCarbonContext.class, "getThreadLocalCarbonContext"))
+ .toReturn(this.privilegedCarbonContext);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class,
+ "getDeviceAccessAuthorizationService")).toReturn(this.deviceAccessAuthorizationService);
+ Mockito.when(this.deviceAccessAuthorizationService.isUserAuthorized(Mockito.any(DeviceIdentifier.class)))
+ .thenReturn(true);
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getEventStreamAdminServiceStub"))
+ .toThrow(new UserStoreException());
+ Map payload = new HashMap<>();
+ CacheImpl cache = Mockito.mock(CacheImpl.class);
+
+ PowerMockito.stub(PowerMockito.method(DeviceMgtAPIUtils.class, "getDynamicEventCache"))
+ .toReturn(cache);
+
+ Response response = this.deviceAgentService.publishEvents(payload, TEST_DEVICE_TYPE, TEST_DEVICE_IDENTIFIER);
+ Assert.assertNotNull(response, "Response should not be null");
+ Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(),
+ "The response status should be 500");
+ }
+}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
index f75b181fc41..5fa279b6a0f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/DeviceMgtAPITestHelper.java
@@ -17,20 +17,28 @@
*/
package org.wso2.carbon.device.mgt.jaxrs.service.impl.util;
+import org.wso2.carbon.device.mgt.common.Device;
+import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
+import org.wso2.carbon.device.mgt.common.Feature;
+import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.type.mgt.DeviceTypeMetaDefinition;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
/**
* Helper class for Device Management API test cases.
- * */
+ */
public class DeviceMgtAPITestHelper {
private static final String DEVICE_TYPE_DESCRIPTION = "Dummy Description";
- private static final String DEVICE_TYPE = "TEST_DEVICE_TYPE";
+ public static final String DEVICE_TYPE = "TEST_DEVICE_TYPE";
+ public static final String DEVICE_NAME = "TEST_DEVICE";
+ public static final String DEVICE_IDENTIFIER = "12345";
+ public final static String OWNER = "admin";
/**
* Creates a Device Type with given name and given id.
@@ -73,4 +81,52 @@ public class DeviceMgtAPITestHelper {
return deviceTypes;
}
+
+ public static Device generateDummyDevice(String deviceType, String identifier) {
+ Device device = new Device();
+ device.setEnrolmentInfo(generateEnrollmentInfo(new Date().getTime(), new Date().getTime(), OWNER, EnrolmentInfo
+ .OwnerShip.BYOD, EnrolmentInfo.Status.ACTIVE));
+ device.setDescription("Test Description");
+ device.setDeviceIdentifier(identifier);
+ device.setType(deviceType);
+ device.setDeviceInfo(generateDeviceInfo());
+ device.setName(DEVICE_NAME);
+ device.setFeatures(new ArrayList<>());
+ device.setProperties(new ArrayList<>());
+ return device;
+ }
+
+ public static EnrolmentInfo generateEnrollmentInfo(long dateOfEnrollment, long dateOfLastUpdate,
+ String owner, EnrolmentInfo.OwnerShip ownership,
+ EnrolmentInfo.Status status) {
+ EnrolmentInfo enrolmentInfo = new EnrolmentInfo();
+ enrolmentInfo.setDateOfEnrolment(dateOfEnrollment);
+ enrolmentInfo.setDateOfLastUpdate(dateOfLastUpdate);
+ enrolmentInfo.setOwner(owner);
+ enrolmentInfo.setOwnership(ownership);
+ enrolmentInfo.setStatus(status);
+ return enrolmentInfo;
+ }
+
+ public static DeviceInfo generateDeviceInfo() {
+ DeviceInfo deviceInfo = new DeviceInfo();
+ deviceInfo.setIMEI("IMEI-12345");
+ deviceInfo.setIMSI("IMSI-12344");
+ deviceInfo.setDeviceModel("DUMMY_MODEL");
+ deviceInfo.setVendor("WSO2");
+ deviceInfo.setOsVersion("OREO");
+ deviceInfo.setOsBuildDate("24-05-2017");
+ deviceInfo.setBatteryLevel(25.0);
+ deviceInfo.setInternalTotalMemory(1.5);
+ deviceInfo.setInternalAvailableMemory(2.5);
+ deviceInfo.setExternalTotalMemory(16.76);
+ deviceInfo.setExternalAvailableMemory(4.56);
+ deviceInfo.setConnectionType("CON_TYPE");
+ deviceInfo.setSsid("SSID");
+ deviceInfo.setCpuUsage(23.5);
+ deviceInfo.setTotalRAMMemory(1.5);
+ deviceInfo.setAvailableRAMMemory(2.33);
+ deviceInfo.setPluggedIn(true);
+ return deviceInfo;
+ }
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/resources/testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/resources/testng.xml
index 24778ace3bd..aa09de781ff 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/resources/testng.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/test/resources/testng.xml
@@ -27,6 +27,7 @@
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
index c1efd2b7272..497aebaf52b 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml
@@ -21,7 +21,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
index 6239e0f5bfa..fea41de5e86 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
index 58d4c814c3a..9e5adfe5bc3 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
index a591b53fffe..f8b5b65e80d 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/pom.xml
@@ -22,7 +22,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
index 7a37e26f0e9..b130d1ac80f 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml
@@ -23,7 +23,7 @@
device-mgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/device-mgt/pom.xml b/components/device-mgt/pom.xml
index 0adf4c00cea..23f607c4d94 100644
--- a/components/device-mgt/pom.xml
+++ b/components/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
index 42015b9d0bb..831fe266173 100644
--- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
+++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
email-sender
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/email-sender/pom.xml b/components/email-sender/pom.xml
index 626d7120494..6f237e3336f 100644
--- a/components/email-sender/pom.xml
+++ b/components/email-sender/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
index 2b2350c523a..0977d138e17 100644
--- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml
@@ -22,13 +22,13 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - OAuth Extensions
http://wso2.org
diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
index 936055e4510..d22dc17c898 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml
@@ -21,7 +21,7 @@
identity-extensions
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
4.0.0
diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
index 0e4087e00d4..e229e1b4187 100644
--- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
+++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
identity-extensions
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/components/identity-extensions/pom.xml b/components/identity-extensions/pom.xml
index fd59e2dca83..b66a2446e41 100644
--- a/components/identity-extensions/pom.xml
+++ b/components/identity-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
index 76f6ca1b6d6..b2589ada08a 100644
--- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.complex.policy.decision.point
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
index 863d6a05f2d..68968707c71 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml
@@ -3,14 +3,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.decision.point
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Policy Decision Point
WSO2 Carbon - Policy Decision Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
index 7eb6d2d634a..a4c2a32678f 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml
@@ -3,7 +3,7 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
@@ -11,7 +11,7 @@
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.information.point
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Policy Information Point
WSO2 Carbon - Policy Information Point
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
index 57af4c1cdee..401f6bc79a9 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.common
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Common
WSO2 Carbon - Policy Management Common
diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
index b1a0cbceef5..46e79b1431f 100644
--- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
+++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.policy.mgt.core
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Policy Management Core
WSO2 Carbon - Policy Management Core
diff --git a/components/policy-mgt/pom.xml b/components/policy-mgt/pom.xml
index 687c8e92015..e2f1ee710f0 100644
--- a/components/policy-mgt/pom.xml
+++ b/components/policy-mgt/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
policy-mgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Policy Management Component
http://wso2.org
diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml
index 10f4243f9fb..79fdcaa8e9a 100644
--- a/components/test-coverage/pom.xml
+++ b/components/test-coverage/pom.xml
@@ -21,7 +21,7 @@
carbon-devicemgt
org.wso2.carbon.devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
index ee5daae27da..fd3b1addf57 100644
--- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
+++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.devicemgt
org.wso2.carbon.webapp.authenticator.framework
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
WSO2 Carbon - Web Application Authenticator Framework Bundle
diff --git a/components/webapp-authenticator-framework/pom.xml b/components/webapp-authenticator-framework/pom.xml
index 54dffc52b22..8f94ca6eb89 100644
--- a/components/webapp-authenticator-framework/pom.xml
+++ b/components/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
index 909dedb229d..659372129e1 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.application.extension.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - API Management Application Extension Feature
http://wso2.org
This feature contains an implementation of a api application registration, which takes care of subscription
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
index 8ff665685ef..ee6adcb430f 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.handler.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.handler.server.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Management - APIM handler Server Feature
http://wso2.org
This feature contains the handler for the api authentications
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
index 5fdeeaed29e..4e0eec2ed61 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.integration.client.feature/pom.xml
@@ -21,13 +21,13 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.integration.client.feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - APIM Integration Client Feature
http://wso2.org
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
index a91b22c590e..58e608d091c 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/pom.xml
@@ -21,14 +21,14 @@
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.apimgt.webapp.publisher.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - API Management Webapp Publisher Feature
http://wso2.org
This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing
diff --git a/features/apimgt-extensions/pom.xml b/features/apimgt-extensions/pom.xml
index cc087939260..a51c07ec747 100644
--- a/features/apimgt-extensions/pom.xml
+++ b/features/apimgt-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
apimgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - API Management Extensions Feature
http://wso2.org
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
index adbe09b5ba8..753b89897ca 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
index da7838177a2..622ffd75d36 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
index 3974bded25d..ed6b4549637 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.certificate.mgt.server.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Certificate Management Server Feature
http://wso2.org
This feature contains the core bundles required for back-end Certificate Management functionality
diff --git a/features/certificate-mgt/pom.xml b/features/certificate-mgt/pom.xml
index e81827cf80e..b30d2610c5b 100644
--- a/features/certificate-mgt/pom.xml
+++ b/features/certificate-mgt/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
certificate-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Certificate Management Feature
http://wso2.org
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
index 5ce0fe2af2c..251ffadafd8 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Type Deployer Feature
http://wso2.org
WSO2 Carbon - Device Type Deployer Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
index 1284c5988e2..2997d67e412 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - FCM Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
index c355ed84f7f..76577af3b3c 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
index 684f8a609cf..972714a61bf 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - MQTT Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - MQTT Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
index 5807314f4eb..68c3dce3f98 100644
--- a/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
+++ b/features/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - XMPP Based Push Notification Provider Feature
http://wso2.org
WSO2 Carbon - XMPP Based Push Notification Provider Feature
diff --git a/features/device-mgt-extensions/pom.xml b/features/device-mgt-extensions/pom.xml
index 290e70ccb2e..e2e6bba960d 100644
--- a/features/device-mgt-extensions/pom.xml
+++ b/features/device-mgt-extensions/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
index 8396a20cfbd..204bfb1ba69 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.analytics.data.publisher.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains bundles related to device analytics data publisher
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
index f48d31d0875..e407f5d7f17 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.api.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
index a5a07635af7..a78c50ffa16 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.extensions.feature/pom.xml
@@ -4,14 +4,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.extensions.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Management Extensions Feature
http://wso2.org
This feature contains common extensions used by key device management functionalities
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
index 4737779344d..65c08a138a0 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
index c853699d0a8..24e82c4a7e8 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.server.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
index 5e1874cd627..44ab905ceb2 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.ui.feature/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
device-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
diff --git a/features/device-mgt/pom.xml b/features/device-mgt/pom.xml
index 993f255d752..d72c826ad96 100644
--- a/features/device-mgt/pom.xml
+++ b/features/device-mgt/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
index 1608316a2d1..7028124b767 100644
--- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
+++ b/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
email-sender-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.email.sender.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Email Sender Feature
http://wso2.org
This feature contains the core bundles required for email sender related functionality
diff --git a/features/email-sender/pom.xml b/features/email-sender/pom.xml
index 92bf8c787c2..187b735791e 100644
--- a/features/email-sender/pom.xml
+++ b/features/email-sender/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
email-sender-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Email Sender Feature
http://wso2.org
diff --git a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
index 47e569b051d..27003d68727 100644
--- a/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
+++ b/features/jwt-client/org.wso2.carbon.identity.jwt.client.extension.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
jwt-client-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.identity.jwt.client.extension.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - JWT Client Feature
http://wso2.org
This feature contains jwt client implementation from which we can get a access token using the jwt
diff --git a/features/jwt-client/pom.xml b/features/jwt-client/pom.xml
index 1a0838113ed..880e4e40c62 100644
--- a/features/jwt-client/pom.xml
+++ b/features/jwt-client/pom.xml
@@ -23,13 +23,13 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
jwt-client-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - JWT Client Extension Feature
http://wso2.org
diff --git a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
index 8188a723228..947888d1cc2 100644
--- a/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
+++ b/features/oauth-extensions/org.wso2.carbon.device.mgt.oauth.extensions.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.device.mgt.oauth.extensions.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Mgt OAuth Extensions Feature
http://wso2.org
This feature contains devicemgt related OAuth extensions
diff --git a/features/oauth-extensions/pom.xml b/features/oauth-extensions/pom.xml
index 69f37c1c5f6..061c6239e0e 100644
--- a/features/oauth-extensions/pom.xml
+++ b/features/oauth-extensions/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
oauth-extensions-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Device Management OAuth Extensions Feature
http://wso2.org
diff --git a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
index ee7a4b7d6fa..394813ac40f 100644
--- a/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
+++ b/features/policy-mgt/org.wso2.carbon.policy.mgt.server.feature/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.policy.mgt.server.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Policy Management Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/policy-mgt/pom.xml b/features/policy-mgt/pom.xml
index 013fa94666c..3b9b539f07b 100644
--- a/features/policy-mgt/pom.xml
+++ b/features/policy-mgt/pom.xml
@@ -23,14 +23,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
policy-mgt-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Policy Management Feature
http://wso2.org
diff --git a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
index 299b4eb157b..54f90b5f90c 100644
--- a/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
+++ b/features/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework.server.feature/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../pom.xml
4.0.0
org.wso2.carbon.webapp.authenticator.framework.server.feature
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Webapp Authenticator Framework Server Feature
http://wso2.org
This feature contains the core bundles required for Back-end Device Management functionality
diff --git a/features/webapp-authenticator-framework/pom.xml b/features/webapp-authenticator-framework/pom.xml
index 621c601d5d3..3505e7c9f02 100644
--- a/features/webapp-authenticator-framework/pom.xml
+++ b/features/webapp-authenticator-framework/pom.xml
@@ -22,14 +22,14 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
../../pom.xml
4.0.0
org.wso2.carbon.devicemgt
webapp-authenticator-framework-feature
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
pom
WSO2 Carbon - Webapp Authenticator Framework Feature
http://wso2.org
diff --git a/pom.xml b/pom.xml
index 43abf20bd92..9e0f91f612f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
org.wso2.carbon.devicemgt
carbon-devicemgt
pom
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
WSO2 Carbon - Device Management - Parent
http://wso2.org
WSO2 Connected Device Manager Components
@@ -1869,7 +1869,7 @@
1.2.11.wso2v10
- 3.0.159-SNAPSHOT
+ 3.0.160-SNAPSHOT
4.4.8