diff options
author | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:04:51 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-06-19 17:05:05 +0100 |
commit | 9c0c0c8f61a08aec5c95ebb90647a0aae445e129 (patch) | |
tree | 4224dadcc265e2980a6f097976a3beb34ce14e93 /model/basic-model/src | |
parent | 73470fb02d3d8a2fb37e80d9fb23a75955da32b5 (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')
43 files changed, 42 insertions, 141 deletions
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java index 3f2affb42..8bbc652e7 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConcept.java @@ -23,9 +23,7 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.io.Serializable; import java.util.List; - import javax.xml.bind.annotation.XmlType; - import org.onap.policy.common.utils.validation.Assertions; /** diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java index 34c704c7b..175cded08 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxConceptGetterImpl.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.NavigableMap; import java.util.Set; import java.util.TreeSet; - import org.onap.policy.common.utils.validation.Assertions; /** @@ -78,8 +77,7 @@ public class AxConceptGetterImpl<C> implements AxConceptGetter<C> { break; } foundKey = nextkey; - } - while (true); + } while (true); return conceptMap.get(foundKey); } @@ -138,8 +136,7 @@ public class AxConceptGetterImpl<C> implements AxConceptGetter<C> { break; } returnSet.add(conceptMap.get(foundKey)); - } - while (true); + } while (true); return returnSet; } diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java index 35010bf4b..fc8c0cd14 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInfo.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; import java.util.Random; import java.util.UUID; - import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.EmbeddedId; @@ -36,7 +35,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.apache.commons.lang3.StringUtils; import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.apex.model.basicmodel.dao.converters.CDataConditioner; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java index 977cfcf4f..fc876d8ea 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyInformation.java @@ -29,7 +29,6 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; import java.util.UUID; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -42,7 +41,6 @@ import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java index 8eed845ad..fe786469b 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxKeyUse.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java index e54b88078..9c71638fc 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxModel.java @@ -24,7 +24,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.List; import java.util.Set; import java.util.TreeSet; - import javax.persistence.CascadeType; import javax.persistence.EmbeddedId; import javax.persistence.Entity; @@ -40,7 +39,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.apex.model.basicmodel.handling.KeyInfoMarshalFilter; import org.onap.policy.apex.model.basicmodel.service.ModelService; @@ -212,9 +210,8 @@ public class AxModel extends AxConcept { result = validateArtifactKeyInModel((AxArtifactKey) axKey, artifactKeySet, result); } else if (axKey instanceof AxReferenceKey) { result = validateReferenceKeyInModel((AxReferenceKey) axKey, referenceKeySet, result); - } - // It must be an AxKeyUse, nothing else is legal - else { + } else { + // It must be an AxKeyUse, nothing else is legal usedKeySet.add((AxKeyUse) axKey); } } diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java index 32fb76c99..4b9d647a9 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxReferenceKey.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.basicmodel.concepts; import java.util.ArrayList; import java.util.List; - import javax.persistence.Column; import javax.persistence.Embeddable; import javax.xml.bind.annotation.XmlAccessType; @@ -31,7 +30,6 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - import org.onap.policy.apex.model.basicmodel.concepts.AxValidationResult.ValidationResult; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java index 655e9a99f..b84646038 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/ApexDao.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.dao; import java.util.Collection; import java.util.List; - 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.AxConcept; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java index 37943ff56..f5fffdb00 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/converters/Uuid2String.java @@ -21,7 +21,6 @@ package org.onap.policy.apex.model.basicmodel.dao.converters; import java.util.UUID; - import javax.persistence.AttributeConverter; import javax.persistence.Converter; import javax.xml.bind.annotation.adapters.XmlAdapter; @@ -42,8 +41,7 @@ public class Uuid2String extends XmlAdapter<String, UUID> implements AttributeCo String returnString; if (uuid == null) { returnString = ""; - } - else { + } else { returnString = uuid.toString(); } return returnString; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java index b8a97928c..39e8b0def 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/dao/impl/DefaultApexDao.java @@ -24,11 +24,9 @@ package org.onap.policy.apex.model.basicmodel.dao.impl; import java.util.Collection; import java.util.Collections; import java.util.List; - import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; - 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; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java index aead4cb2b..04dd2a3f4 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelFileWriter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.File; import java.io.FileOutputStream; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.slf4j.ext.XLogger; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java index b593b3e9f..39eacce30 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelReader.java @@ -28,7 +28,6 @@ import java.io.InputStreamReader; import java.io.StringReader; import java.net.URL; import java.util.regex.Pattern; - import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBElement; @@ -37,7 +36,6 @@ import javax.xml.bind.Unmarshaller; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; - import org.eclipse.persistence.jaxb.JAXBContextFactory; import org.eclipse.persistence.jaxb.MarshallerProperties; import org.eclipse.persistence.oxm.MediaType; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java index 50e8bb5fa..8217badbc 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelSaver.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.File; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxModel; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java index 91e58d663..f1725d8e3 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelStringWriter.java @@ -22,7 +22,6 @@ package org.onap.policy.apex.model.basicmodel.handling; import java.io.ByteArrayOutputStream; - import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; import org.onap.policy.common.utils.validation.Assertions; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java index 8d6c01e4e..0dab08dcb 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexModelWriter.java @@ -26,7 +26,6 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Set; import java.util.TreeSet; - import javax.xml.XMLConstants; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; @@ -40,7 +39,6 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; - import org.eclipse.persistence.jaxb.JAXBContextFactory; import org.eclipse.persistence.jaxb.MarshallerProperties; import org.eclipse.persistence.oxm.MediaType; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java index a793a60d5..230a8abbb 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/ApexSchemaGenerator.java @@ -24,13 +24,11 @@ import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.io.StringWriter; - import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.SchemaOutputResolver; import javax.xml.transform.Result; import javax.xml.transform.stream.StreamResult; - import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java index 41cf4df89..cfc385d01 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/handling/KeyInfoMarshalFilter.java @@ -89,7 +89,7 @@ public class KeyInfoMarshalFilter extends XmlAdapter<AxKeyInformation, AxKeyInfo */ @Override public AxKeyInformation marshal(AxKeyInformation val) throws Exception { - if (val == null || val.getKeyInfoMap() == null || val.getKeyInfoMap().isEmpty() || filterList.isEmpty() ) { + if (val == null || val.getKeyInfoMap() == null || val.getKeyInfoMap().isEmpty() || filterList.isEmpty()) { return val; } //create a new keyinfo clone to avoid removing keyinfo entries from the original model diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java index 251d92af5..c6eb0e011 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/service/ModelService.java @@ -23,7 +23,6 @@ package org.onap.policy.apex.model.basicmodel.service; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; - import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException; import org.onap.policy.apex.model.basicmodel.concepts.AxConcept; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java index 6bab169a8..bf63e6db7 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/test/TestApexModel.java @@ -24,7 +24,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.net.URL; - 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.concepts.AxValidationResult; diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java index c70e51ab2..d8580be06 100644 --- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java +++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/xml/AxReferenceKeyAdapter.java @@ -21,12 +21,10 @@ package org.onap.policy.apex.model.basicmodel.xml; import java.io.Serializable; - import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlAdapter; - import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; /** 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()); } } |