summaryrefslogtreecommitdiffstats
path: root/model/model-api/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-09-03 13:32:01 +0100
committerliamfallon <liam.fallon@est.tech>2020-09-03 15:40:06 +0100
commit386d8b15efd66cbd176e9911806c55a437cc6376 (patch)
tree0ea6603a5cfd1ee24721a63e494ef48ffedb6b23 /model/model-api/src
parent6f154bcd5c86bf9027d297df8cbdb8310eb88754 (diff)
Clean up warnings and SONAR issues
Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model/model-api/src')
-rw-r--r--model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
index 02195e4db..4071803a0 100644
--- a/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
+++ b/model/model-api/src/test/java/org/onap/policy/apex/model/modelapi/ApexModelApiTest.java
@@ -144,11 +144,9 @@ public class ApexModelApiTest {
@Test
public void testApexModelUrl() throws IOException {
final ApexModel apexModel = new ApexModelFactory().createApexModel(null, false);
- //ApexApiResult result = null;
- assertThatThrownBy(() -> apexModel.readFromUrl(null))
- .isInstanceOf(IllegalArgumentException.class);
- assertThatThrownBy(() -> apexModel.writeToUrl(null, true))
- .isInstanceOf(IllegalArgumentException.class);
+
+ assertThatThrownBy(() -> apexModel.readFromUrl(null)).isInstanceOf(IllegalArgumentException.class);
+ assertThatThrownBy(() -> apexModel.writeToUrl(null, true)).isInstanceOf(IllegalArgumentException.class);
ApexApiResult result = null;
result = apexModel.readFromUrl("zooby/looby");
assertEquals(ApexApiResult.Result.FAILED, result.getResult());
@@ -162,8 +160,6 @@ public class ApexModelApiTest {
result = apexModel.writeToUrl("zooby://zooby/looby", false);
assertEquals(ApexApiResult.Result.FAILED, result.getResult());
- final ApexModel apexModelJSon = new ApexModelFactory().createApexModel(null, false);
-
final File tempJsonModelFile = File.createTempFile("ApexModelTest", ".json");
result = apexModel.saveToFile(tempJsonModelFile.getCanonicalPath(), false);