From 386d8b15efd66cbd176e9911806c55a437cc6376 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 3 Sep 2020 13:32:01 +0100 Subject: Clean up warnings and SONAR issues Issue-ID: POLICY-2654 Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1 Signed-off-by: liamfallon --- .../org/onap/policy/apex/model/modelapi/ApexModelApiTest.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'model/model-api') 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); -- cgit 1.2.3-korg