From f35bab013310a0f51dbe944ef159a20f38ccb54d Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Thu, 12 Oct 2017 11:30:16 +0530 Subject: [PATCH] Changed the type of exception. --- .../device/mgt/core/search/SearchManagementServiceTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/search/SearchManagementServiceTest.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/search/SearchManagementServiceTest.java index 242df3cecb..46eac34837 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/search/SearchManagementServiceTest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/search/SearchManagementServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * 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 @@ -43,7 +43,6 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; - /** * This class contains unit tests for the class SearchManagerService * */ @@ -184,7 +183,7 @@ public class SearchManagementServiceTest extends BaseDeviceManagementTest { Assert.assertEquals(updatedDevices.size(), 0); } - @Test(expectedExceptions = {SearchMgtException.class}, description = "Test for invalid number") + @Test(expectedExceptions = {NumberFormatException.class}, description = "Test for invalid number") public void testInvalidNumber() throws SearchMgtException { SearchContext context = new SearchContext(); List conditions = new ArrayList<>();