Change HTTP Requests into HTTPS Ones
[holmes/rule-management.git] / rulemgt / src / test / java / org / onap / holmes / rulemgt / dcae / DcaeConfigurationPollingTest.java
index a330306..1037495 100644 (file)
  */
 package org.onap.holmes.rulemgt.dcae;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.hamcrest.CoreMatchers.anyOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
 import static org.powermock.api.mockito.PowerMockito.when;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import javax.ws.rs.ProcessingException;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -39,7 +34,7 @@ import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 import org.powermock.reflect.Whitebox;
 
-@PrepareForTest({DcaeConfigurationPolling.class, MicroServiceConfig.class, ObjectMapper.class})
+@PrepareForTest({DcaeConfigurationPolling.class, MicroServiceConfig.class})
 @RunWith(PowerMockRunner.class)
 public class DcaeConfigurationPollingTest {
 
@@ -57,7 +52,7 @@ public class DcaeConfigurationPollingTest {
     public void testDaceConfigurationPolling_getDcaeConfigurations_exception() throws Exception {
         PowerMock.resetAll();
         thrown.expect(CorrelationException.class);
-        thrown.expectMessage("host");
+        thrown.expectMessage("syntax error, pos 1");
         PowerMockito.mockStatic(MicroServiceConfig.class);
         when(MicroServiceConfig.getServiceConfigInfoFromCBS("holmes-rule-mgmt"))
                 .thenReturn("host");
@@ -93,7 +88,7 @@ public class DcaeConfigurationPollingTest {
     public void testDaceConfigurationPolling_addAllCorrelationRules_connection_exception()
             throws Exception {
         PowerMock.resetAll();
-        thrown.expect(ProcessingException.class);
+        thrown.expect(CorrelationException.class);
         DcaeConfigurations dcaeConfigurations = new DcaeConfigurations();
         Rule rule = new Rule("test", "test", "tset",1);
         dcaeConfigurations.getDefaultRules().add(rule);