Fix Sonar issues
Fix assertThat usage and tests
Issue-ID: SDC-3116
Signed-off-by: ChrisC <christophe.closset@intl.att.com>
Change-Id: Ife533a479096047c4ccb7ae46dfaaa6e2ece974d
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java
index f9bb2bd..1b65912 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/datamodel/UiComponentDataConverterTest.java
@@ -1,5 +1,6 @@
/*
* Copyright © 2016-2019 European Support Limited
+ * Modifications © 2020 AT&T
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -283,7 +284,7 @@
UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource,
Collections.singletonList("policies"));
- assertThat(CollectionUtils.isNotEmpty(uiComponentDataTransfer.getPolicies()));
+ assertThat(uiComponentDataTransfer.getPolicies()).isNotEmpty();
}
@Test
@@ -292,7 +293,7 @@
UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource,
Collections.singletonList("nodeFilter"));
- assertThat(MapUtils.isEmpty(uiComponentDataTransfer.getNodeFilter()));
+ assertThat(uiComponentDataTransfer.getNodeFilter()).isNull();
}
@Test
@@ -309,7 +310,7 @@
UiComponentDataTransfer uiComponentDataTransfer = uiComponentDataConverter.getUiDataTransferFromResourceByParams(resource,
Collections.singletonList("nodeFilter"));
- assertThat(MapUtils.isNotEmpty(uiComponentDataTransfer.getNodeFilter()));
+ assertThat(uiComponentDataTransfer.getNodeFilter()).isNotEmpty();
}
private Resource buildResourceWithGroups() {