* limitations under the License.\r
*/\r
\r
-package org.openo.holmes.rulemgt.bolt.enginebolt;\r
+package org.onap.holmes.rulemgt.bolt.enginebolt;\r
\r
\r
import static org.hamcrest.MatcherAssert.assertThat;\r
import org.junit.Rule;\r
import org.junit.Test;\r
import org.junit.rules.ExpectedException;\r
-import org.openo.holmes.common.exception.CorrelationException;\r
-import org.openo.holmes.common.utils.I18nProxy;\r
-import org.openo.holmes.rulemgt.bean.request.CorrelationCheckRule4Engine;\r
-import org.openo.holmes.rulemgt.bean.request.CorrelationDeployRule4Engine;\r
+import org.onap.holmes.rulemgt.bean.request.CorrelationCheckRule4Engine;\r
+import org.onap.holmes.rulemgt.bean.request.CorrelationDeployRule4Engine;\r
+import org.onap.holmes.common.exception.CorrelationException;\r
import org.powermock.api.easymock.PowerMock;\r
import org.powermock.reflect.Whitebox;\r
\r
@Test\r
public void deployEngine_invoke_rule_deploy_exception() throws Exception {\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.RULE_MANAGEMENT_CALL_DEPLOY_RULE_REST_FAILED);\r
+ thrown.expectMessage("Failed to call the rule deployment RESTful API.");\r
\r
EasyMock.expect(engineServiceMock.deploy(EasyMock.anyObject(CorrelationDeployRule4Engine.class))).andThrow(\r
new RuntimeException(""));\r
@Test\r
public void deployEngine_http_status_not_ok() throws Exception {\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.ENGINE_DEPLOY_RULE_FAILED);\r
+ thrown.expectMessage("Failed to deploy the rule!");\r
\r
EasyMock.expect(engineServiceMock.deploy(EasyMock.anyObject(CorrelationDeployRule4Engine.class)))\r
.andReturn(response);\r
String content = "";\r
\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.RULE_MANAGEMENT_PARSE_DEPLOY_RESULT_ERROR);\r
+ thrown.expectMessage("Failed to parse the value returned by the engine management service.");\r
EasyMock.expect(engineServiceMock.deploy(EasyMock.anyObject(CorrelationDeployRule4Engine.class)))\r
.andReturn(response);\r
EasyMock.expect(response.getStatus()).andReturn(200);\r
@Test\r
public void deleteRuleFromEngine_invoke_rule_delete_exception() throws Exception {\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.RULE_MANAGEMENT_CALL_DELETE_RULE_REST_FAILED);\r
+ thrown.expectMessage("Failed to call the rule deleting RESTful API.");\r
\r
EasyMock.expect(engineServiceMock.delete(EasyMock.anyObject(String.class))).andThrow(\r
new RuntimeException(""));\r
@Test\r
public void deleteRuleFromEngine_http_status_not_ok() throws Exception {\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.RULE_MANAGEMENT_DELETE_RULE_FAILED);\r
+ thrown.expectMessage("Failed to delete the rule!");\r
\r
EasyMock.expect(engineServiceMock.delete(EasyMock.anyObject(String.class)))\r
.andReturn(response);\r
@Test\r
public void checkRuleFromEngine_rule_delete_exception() throws Exception {\r
thrown.expect(CorrelationException.class);\r
- thrown.expectMessage(I18nProxy.RULE_MANAGEMENT_CALL_CHECK_RULE_REST_FAILED);\r
+ thrown.expectMessage("Failed to call the rule verification RESTful API.");\r
\r
EasyMock.expect(engineServiceMock.check(EasyMock.anyObject(CorrelationCheckRule4Engine.class))).andThrow(\r
new RuntimeException(""));\r