aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-04-15 19:43:27 +0200
committersebdet <sebastien.determe@intl.att.com>2021-04-16 18:40:43 +0200
commit4b6371f7ed8e35fd157ea640d05b5898989f32ca (patch)
tree64ce4f0fd56b2c227d093f589fb5bfa76dbc5387 /src/test/java/org
parent1f2d62dd48694fa78041572a200b3e5d04bd268e (diff)
Fix Sonar bugs & sec issues
Fix all bugs & sec issues reported by Sonar Issue-ID: POLICY-3200 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Ifb3d0d3602586b8defb0826e799ef0e24742235c
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/policy/clamp/clds/model/dcae/DcaeInventoryResponseCacheTestItCase.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/java/org/onap/policy/clamp/clds/model/dcae/DcaeInventoryResponseCacheTestItCase.java b/src/test/java/org/onap/policy/clamp/clds/model/dcae/DcaeInventoryResponseCacheTestItCase.java
index 0e7fe6c7e..f406e5ed2 100644
--- a/src/test/java/org/onap/policy/clamp/clds/model/dcae/DcaeInventoryResponseCacheTestItCase.java
+++ b/src/test/java/org/onap/policy/clamp/clds/model/dcae/DcaeInventoryResponseCacheTestItCase.java
@@ -37,6 +37,7 @@ import org.junit.runner.RunWith;
import org.onap.policy.clamp.clds.Application;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.http.HttpStatus;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@@ -99,7 +100,8 @@ public class DcaeInventoryResponseCacheTestItCase {
Exchange exchange = ExchangeBuilder.anExchange(camelContext).build();
Exchange exchangeResponse = camelContext.createProducerTemplate()
.send("direct:get-all-dcae-blueprint-inventory", exchange);
- assertThat(exchangeResponse.getIn().getHeader("CamelHttpResponseCode")).isEqualTo(200);
+ assertThat(HttpStatus.valueOf((Integer) exchangeResponse.getIn().getHeader(Exchange.HTTP_RESPONSE_CODE))
+ .is2xxSuccessful()).isTrue();
Set<DcaeInventoryResponse> blueprint = inventoryCache.getAllBlueprintsPerLoopId("testAsdcServiceId");
assertThat(blueprint.size()).isEqualTo(2);