Used `configurationManager` instead of `getConfigurationManager`
Issue-ID: SDC-2890
Change-Id: I1559ebc60076bd0884ae1136c9c904f7ab46e72e
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
index af0687c..cd0c321 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/catalog/impl/DmaapProducerTest.java
@@ -45,6 +45,7 @@
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
import static org.openecomp.sdc.be.catalog.enums.ResultStatusEnum.FAIL;
import static org.openecomp.sdc.be.catalog.enums.ResultStatusEnum.SERVICE_DISABLED;
import static org.openecomp.sdc.be.config.ConfigurationManager.getConfigurationManager;
@@ -62,8 +63,8 @@
//actually sends the message
-
-
+
+
@Test
public void pushComponentMessageTest() {
boolean oldVal = isActive();
@@ -115,26 +116,24 @@
assertThat(status.getResultStatus()).isEqualTo(FAIL);
} catch (JsonProcessingException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ fail("'JsonProcessingException' detected!", e);
} catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ fail("Unknown exception detected", e);
}finally {
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(oldVal);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(oldVal);
}
}
private boolean isActive(){
- return getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().getActive();
+ return configurationManager.getConfiguration().getDmaapProducerConfiguration().getActive();
}
private void toggleInactive(){
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(false);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(false);
}
private void toggleActive(){
- getConfigurationManager().getConfiguration().getDmaapProducerConfiguration().setActive(true);
+ configurationManager.getConfiguration().getDmaapProducerConfiguration().setActive(true);
}
}
\ No newline at end of file