diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/TestTaskManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/TestTaskManagerImpl.java index 4d7a76f9a6f..fcebed343c1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/TestTaskManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/task/TestTaskManagerImpl.java @@ -31,9 +31,6 @@ public class TestTaskManagerImpl implements TaskManager { @Override public boolean deleteTask(String taskName) throws TaskException { - if(this.registeredTasks.size() <= 0) { - throw new TaskException("Cannot delete task.", TaskException.Code.NO_TASK_EXISTS); - } for (TaskInfo task : this.registeredTasks) { if (task.getName().contains(taskName)) { this.registeredTasks.remove(task);