summaryrefslogtreecommitdiffstats
path: root/model/basic-model/src/test/java
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-06-19 17:04:51 +0100
committerliamfallon <liam.fallon@est.tech>2020-06-19 17:05:05 +0100
commit9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch)
tree4224dadcc265e2980a6f097976a3beb34ce14e93 /model/basic-model/src/test/java
parent73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (diff)
Changes for checkstyle 8.32
Issue-ID: POLICY-2188 Change-Id: I56bbf3aa3bd9e1ef433cc93ad2be0c54d141a2a5 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'model/basic-model/src/test/java')
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java13
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java7
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java4
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java6
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java8
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java6
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java4
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java1
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java1
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java14
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java30
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java2
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java14
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java7
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java1
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java1
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java3
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java5
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java1
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java3
-rw-r--r--model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java3
23 files changed, 36 insertions, 102 deletions
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java
index b00e7db9f..37d3a9dd5 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImplTest.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.fail;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.TreeSet;
-
import org.junit.Test;
/**
@@ -47,10 +46,9 @@ public class AxConceptGetterImplTest {
assertNull(getter.get(keyA));
try {
- getter.get((String)null);
+ getter.get((String) null);
fail("test should throw an exception here");
- }
- catch (Exception getException) {
+ } catch (Exception getException) {
assertEquals("conceptKeyName may not be null", getException.getMessage());
}
@@ -72,15 +70,14 @@ public class AxConceptGetterImplTest {
assertEquals(keyW002, getter.get("W"));
try {
- getter.get((String)null, "0.0.1");
+ getter.get((String) null, "0.0.1");
fail("test should throw an exception here");
- }
- catch (Exception getException) {
+ } catch (Exception getException) {
assertEquals("conceptKeyName may not be null", getException.getMessage());
}
assertEquals(keyW002, getter.get("W", "0.0.2"));
- assertEquals(keyW002, getter.get("W", (String)null));
+ assertEquals(keyW002, getter.get("W", (String) null));
assertEquals(new TreeSet<AxArtifactKey>(keyMap.values()), getter.getAll(null));
assertEquals(new TreeSet<AxArtifactKey>(keyMap.values()), getter.getAll(null, null));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
index ee14a0606..0278f1672 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfoTest.java
@@ -28,11 +28,8 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.UUID;
-
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+
public class AxKeyInfoTest {
@@ -66,7 +63,7 @@ public class AxKeyInfoTest {
assertTrue(testKeyInfo.equals(testKeyInfo));
assertTrue(testKeyInfo.equals(clonedReferenceKey));
assertFalse(testKeyInfo.equals(null));
- assertFalse(testKeyInfo.equals((Object)new AxArtifactKey()));
+ assertFalse(testKeyInfo.equals((Object) new AxArtifactKey()));
assertFalse(testKeyInfo.equals(new AxKeyInfo(new AxArtifactKey())));
assertFalse(testKeyInfo.equals(new AxKeyInfo(key, UUID.randomUUID(), "Some Description")));
assertFalse(testKeyInfo.equals(new AxKeyInfo(key, uuid, "Some Description")));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
index 592933772..1467b77d1 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyTest.java
@@ -125,9 +125,9 @@ public class AxKeyTest {
assertTrue(nullKey0.isNullKey());
AxArtifactKey nullKey1 = new AxArtifactKey();
assertTrue(nullKey1.isNullKey());
- AxArtifactKey nullKey2 = new AxArtifactKey(AxKey.NULL_KEY_NAME,AxKey.NULL_KEY_VERSION);
+ AxArtifactKey nullKey2 = new AxArtifactKey(AxKey.NULL_KEY_NAME, AxKey.NULL_KEY_VERSION);
assertTrue(nullKey2.isNullKey());
- AxArtifactKey notnullKey = new AxArtifactKey("Blah",AxKey.NULL_KEY_VERSION);
+ AxArtifactKey notnullKey = new AxArtifactKey("Blah", AxKey.NULL_KEY_VERSION);
assertFalse(notnullKey.isNullKey());
}
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
index 061df61a5..55c444d97 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUseTest.java
@@ -28,11 +28,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKey.Compatibility;
-import org.onap.policy.apex.model.basicmodel.concepts.AxKeyUse;
-import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
public class AxKeyUseTest {
@@ -68,7 +64,7 @@ public class AxKeyUseTest {
assertTrue(keyUse.equals(keyUse));
assertTrue(keyUse.equals(clonedKeyUse));
- assertFalse(keyUse.equals((Object)"Hello"));
+ assertFalse(keyUse.equals((Object) "Hello"));
assertTrue(keyUse.equals(new AxKeyUse(key)));
assertEquals(0, keyUse.compareTo(keyUse));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
index 2745b95ac..27973b5b9 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKeyTest.java
@@ -29,12 +29,8 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.lang.reflect.Field;
-
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
+
public class AxReferenceKeyTest {
@@ -93,7 +89,7 @@ public class AxReferenceKeyTest {
assertTrue(testReferenceKey.equals(testReferenceKey));
assertTrue(testReferenceKey.equals(clonedReferenceKey));
- assertFalse(testReferenceKey.equals((Object)"Hello"));
+ assertFalse(testReferenceKey.equals((Object) "Hello"));
assertFalse(testReferenceKey.equals(new AxReferenceKey("PKN", "0.0.2", "PLN", "LN")));
assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.2", "PLN", "LN")));
assertFalse(testReferenceKey.equals(new AxReferenceKey("NPKN", "0.0.1", "PLN", "LN")));
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java
index ff2bf9354..2407dab38 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/DummyEntity.java
@@ -23,13 +23,11 @@ package org.onap.policy.apex.model.basicmodel.concepts;
import java.util.Arrays;
import java.util.List;
-
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
@Entity
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java
index 0c62a0376..ff87bc2d0 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ExceptionsTest.java
@@ -24,12 +24,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
-
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexConceptException;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+
public class ExceptionsTest {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
index f2f99a811..21ae9b65c 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
@@ -26,10 +26,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationMessage;
-import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult;
import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult;
public class ValidationTest {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java
index 197c4b206..2b4cd5c30 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/DaoMiscTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.util.Properties;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner;
import org.onap.policy.apex.model.basicmodel.dao.converters.Uuid2String;
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
index 36b18d783..2c68c3987 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/dao/EntityTest.java
@@ -31,7 +31,6 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java
index c74f33ccb..2571ea65b 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelExceptionTest.java
@@ -24,9 +24,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
-
import org.junit.Test;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
public class ApexModelExceptionTest {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java
index 7c0ccc7d1..d6ff31e50 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriterTest.java
@@ -25,11 +25,9 @@ import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
public class ApexModelFileWriterTest {
@@ -82,16 +80,14 @@ public class ApexModelFileWriterTest {
try {
modelFileWriter.apexModelWriteJsonFile(model, AxModel.class, jsonTempFile.getAbsolutePath());
fail("this test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().contains("could not create directory "));
}
try {
modelFileWriter.apexModelWriteXmlFile(model, AxModel.class, jsonTempFile.getAbsolutePath());
fail("this test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().contains("could not create directory "));
}
@@ -108,16 +104,14 @@ public class ApexModelFileWriterTest {
try {
modelFileWriter.apexModelWriteJsonFile(model, AxModel.class, jsonTempFile.getAbsolutePath());
fail("this test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().contains("error processing file "));
}
try {
modelFileWriter.apexModelWriteXmlFile(model, AxModel.class, jsonTempFile.getAbsolutePath());
fail("this test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().contains("error processing file "));
}
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
index d560f62fe..7f2f813d8 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReaderTest.java
@@ -33,20 +33,16 @@ import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Field;
-
import javax.xml.bind.JAXBException;
import javax.xml.bind.PropertyException;
import javax.xml.bind.Unmarshaller;
import javax.xml.transform.stream.StreamSource;
-
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter;
public class ApexModelReaderTest {
@Mock
@@ -81,8 +77,7 @@ public class ApexModelReaderTest {
try {
modelReader.read(baisInvalid);
fail("test should throw an exceptino here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().startsWith("Apex concept validation failed"));
}
@@ -107,8 +102,7 @@ public class ApexModelReaderTest {
try {
modelReader.read(baisDummy);
fail("test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("format of input for Apex concept is neither JSON nor XML", e.getMessage());
}
@@ -116,8 +110,7 @@ public class ApexModelReaderTest {
ByteArrayInputStream nullBais = null;
modelReader.read(nullBais);
fail("test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("concept stream may not be null", e.getMessage());
}
@@ -125,8 +118,7 @@ public class ApexModelReaderTest {
FileInputStream fis = new FileInputStream(new File("somewhere/over/the/rainbow"));
modelReader.read(fis);
fail("test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertTrue(e.getMessage().contains("rainbow"));
}
@@ -136,11 +128,9 @@ public class ApexModelReaderTest {
br.close();
modelReader.read(br);
fail("test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("Unable to read Apex concept ", e.getMessage());
- }
- finally {
+ } finally {
tempFile.delete();
}
@@ -150,11 +140,9 @@ public class ApexModelReaderTest {
try {
modelReader.setSchema(tempFile.getCanonicalPath());
fail("test should throw an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("Unable to load schema", e.getMessage());
- }
- finally {
+ } finally {
tempFile.delete();
}
@@ -178,7 +166,7 @@ public class ApexModelReaderTest {
try {
Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(unmarshallerMock)
- .unmarshal((StreamSource)Mockito.anyObject(), Mockito.anyObject());
+ .unmarshal((StreamSource) Mockito.anyObject(), Mockito.anyObject());
modelReader.read("{Hello}");
fail("Test should throw an exception here");
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java
index 65640916a..21be88377 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaverTest.java
@@ -24,11 +24,9 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver;
public class ApexModelSaverTest {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java
index 22271dda3..cad4e05f3 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriterTest.java
@@ -26,12 +26,10 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelStringWriter;
public class ApexModelStringWriterTest {
@@ -61,32 +59,28 @@ public class ApexModelStringWriterTest {
try {
stringWriter.writeString(null, AxKeyInfo.class, true);
fail("test should thrown an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("concept may not be null", e.getMessage());
}
try {
stringWriter.writeString(null, AxKeyInfo.class, false);
fail("test should thrown an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("concept may not be null", e.getMessage());
}
try {
stringWriter.writeJsonString(null, AxKeyInfo.class);
fail("test should thrown an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("error writing JSON string", e.getMessage());
}
try {
stringWriter.writeXmlString(null, AxKeyInfo.class);
fail("test should thrown an exception here");
- }
- catch (Exception e) {
+ } catch (Exception e) {
assertEquals("error writing XML string", e.getMessage());
}
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
index d25e191a8..1b8461c4e 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriterTest.java
@@ -29,18 +29,15 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.Writer;
import java.lang.reflect.Field;
-
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.PropertyException;
-
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelWriter;
import org.w3c.dom.Document;
public class ApexModelWriterTest {
@@ -159,7 +156,7 @@ public class ApexModelWriterTest {
AxModel model = new DummyApexBasicModelCreator().getModel();
Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(marshallerMock)
- .marshal((AxModel)Mockito.anyObject(), (Writer)Mockito.anyObject());
+ .marshal((AxModel) Mockito.anyObject(), (Writer) Mockito.anyObject());
modelWriter.write(model, baos);
fail("Test should throw an exception here");
@@ -192,7 +189,7 @@ public class ApexModelWriterTest {
AxModel model = new DummyApexBasicModelCreator().getModel();
Mockito.doThrow(new JAXBException("Exception marshalling to JSON")).when(marshallerMock)
- .marshal((AxModel)Mockito.anyObject(), (Document)Mockito.anyObject());
+ .marshal((AxModel) Mockito.anyObject(), (Document) Mockito.anyObject());
modelWriter.write(model, baos);
fail("Test should throw an exception here");
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
index e7388b7e9..0b18abcb1 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGeneratorTest.java
@@ -28,7 +28,6 @@ import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
-
import org.junit.Test;
public class ApexSchemaGeneratorTest {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java
index d04d3a441..353722b2d 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyApexBasicModelCreator.java
@@ -21,7 +21,6 @@
package org.onap.policy.apex.model.basicmodel.handling;
import java.util.UUID;
-
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java
index e0fe60337..887755d03 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/DummyAxModelWithReferences.java
@@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling;
import java.util.ArrayList;
import java.util.List;
-
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
@@ -56,7 +55,7 @@ public class DummyAxModelWithReferences extends AxModel {
List<AxKey> keys = super.getKeys();
for (AxKey key: keys) {
- AxArtifactKey akey = (AxArtifactKey)key;
+ AxArtifactKey akey = (AxArtifactKey) key;
AxReferenceKey keyRef = new AxReferenceKey(akey, akey.getName());
extrakeyList.add(keyRef);
}
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
index af0ef5f3c..c666dd667 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexBasicModelConceptsTester.java
@@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue;
import java.util.List;
import java.util.Set;
-
import org.junit.Before;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
@@ -74,7 +73,7 @@ public class SupportApexBasicModelConceptsTester {
assertTrue(model.equals(model));
assertTrue(model.equals(clonedModel));
assertFalse(model.equals(null));
- assertFalse(model.equals((Object)"Hello"));
+ assertFalse(model.equals((Object) "Hello"));
clonedModel.getKey().setVersion("0.0.2");
assertFalse(model.equals(clonedModel));
clonedModel.getKey().setVersion("0.0.1");
@@ -96,7 +95,7 @@ public class SupportApexBasicModelConceptsTester {
final AxKeyInformation clonedKeyI = new AxKeyInformation(keyI);
assertFalse(keyI.equals(null));
- assertFalse(keyI.equals((Object)new AxArtifactKey()));
+ assertFalse(keyI.equals((Object) new AxArtifactKey()));
assertTrue(keyI.equals(clonedKeyI));
clonedKeyI.setKey(new AxArtifactKey());
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java
index 123125bb1..9ad34a38c 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportApexModelCreator1.java
@@ -21,7 +21,6 @@
package org.onap.policy.apex.model.basicmodel.handling;
import java.util.UUID;
-
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInformation;
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java
index bed65c6e7..2120b984d 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/handling/SupportConceptGetterTester.java
@@ -28,14 +28,11 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.UUID;
-
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo;
import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelFileWriter;
-import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
public class SupportConceptGetterTester {
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java
index 2befe3336..12a67c803 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapterTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
-import org.onap.policy.apex.model.basicmodel.xml.AxReferenceKeyAdapter;
public class AxReferenceKeyAdapterTest {
@@ -38,6 +37,6 @@ public class AxReferenceKeyAdapterTest {
String rkeyString = arka.marshal(rkey);
assertEquals("LN", rkeyString);
- assertEquals(rkey.getLocalName(),arka.unmarshal(rkeyString).getLocalName());
+ assertEquals(rkey.getLocalName(), arka.unmarshal(rkeyString).getLocalName());
}
}