From 333e6b47fcd6df91136ae1efa7eecca50bc50a04 Mon Sep 17 00:00:00 2001 From: Chris André Date: Tue, 14 Apr 2020 16:21:43 -0400 Subject: Used `configurationManager` instead of `getConfigurationManager` Issue-ID: SDC-2890 Change-Id: I1559ebc60076bd0884ae1136c9c904f7ab46e72e Signed-off-by: Chris Andre --- .../sdc/be/catalog/impl/DmaapProducerTest.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'catalog-be') 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 af0687ccc6..cd0c32198d 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.ArrayList; 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 @@ public class DmaapProducerTest { //actually sends the message - - + + @Test public void pushComponentMessageTest() { boolean oldVal = isActive(); @@ -115,26 +116,24 @@ public class DmaapProducerTest { 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 -- cgit 1.2.3-korg