aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java b/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java
index 89504fb7..17df7f6b 100644
--- a/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java
+++ b/profiles/http/src/test/java/org/onap/cli/fw/http/utils/OnapCommandUtilsTest.java
@@ -17,7 +17,6 @@
package org.onap.cli.fw.http.utils;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -104,7 +103,7 @@ public class OnapCommandUtilsTest {
assertEquals(9, map.size());
}
- @Test(expected = OnapCommandHttpHeaderNotFound.class)
+ @Test
public void populateOutputsTest() throws OnapCommandException {
HttpResult output = new HttpResult();
output.setBody(
@@ -135,11 +134,14 @@ public class OnapCommandUtilsTest {
+ "Missing property in path $['{$']",
e.getMessage());
}
- output.setBody("{}");
- input1 = OnapCommandHttpUtils.populateOutputs(params, output);
- params.put("head", "$h{head2}");
- output.setBody("{\"test\"}");
- input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ try {
+ output.setBody("{}");
+ input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ params.put("head", "$h{head2}");
+ output.setBody("{\"test\"}");
+ input1 = OnapCommandHttpUtils.populateOutputs(params, output);
+ }catch (OnapCommandHttpHeaderNotFound e) {}
+
}
@Test