aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-06-18 13:34:31 +0000
committerGerrit Code Review <gerrit@onap.org>2021-06-18 13:34:31 +0000
commit1ada3a6368f340df653886c4229b192ce7a5fc35 (patch)
tree29da4289fab5a9bbbfb04ae0f1be36d02567e9b3 /models-interactions
parentca380de65acbbb4db6187f172985bc3edfda550a (diff)
parent585ec0f637f743f54b619f9c78b5baa8f1a1286f (diff)
Merge "Use lombok annotations for sdnr, simulators"
Diffstat (limited to 'models-interactions')
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java17
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java61
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java21
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java16
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java15
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java13
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java14
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java27
-rw-r--r--models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java7
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java2
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java4
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java7
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java4
-rw-r--r--models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java2
-rw-r--r--models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java9
15 files changed, 57 insertions, 162 deletions
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java
index d8555e4a7..ec17da270 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciCommonHeader.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,11 +30,15 @@ import java.util.Map;
import java.util.UUID;
import lombok.EqualsAndHashCode;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
+@NoArgsConstructor
+@ToString
public class PciCommonHeader implements Serializable {
private static final long serialVersionUID = 5435363539127062114L;
@@ -57,10 +61,6 @@ public class PciCommonHeader implements Serializable {
@SerializedName(value = "Flags")
private Map<String, String> flags = new HashMap<>();
- public PciCommonHeader() {
-
- }
-
/**
* Used to copy a pci common header.
*
@@ -79,11 +79,4 @@ public class PciCommonHeader implements Serializable {
this.flags.putAll(commonHeader.flags);
}
}
-
- @Override
- public String toString() {
- return "CommonHeader [timeStamp=" + timeStamp + ", apiVer=" + apiVer
- + ", requestId=" + requestId + ", subRequestId=" + subRequestId + ", requestTrack=" + requestTrack
- + ", flags=" + flags + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java
index 71e4c56e9..04830b08d 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,10 +27,12 @@ import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
+@ToString
public class PciRequest implements Serializable {
private static final long serialVersionUID = 323235565922846624L;
@@ -43,61 +45,4 @@ public class PciRequest implements Serializable {
@SerializedName(value = "Payload")
private String payload;
-
- public PciRequest() {
- // Create a default PCI request
- }
-
- public PciCommonHeader getCommonHeader() {
- return commonHeader;
- }
-
- public void setCommonHeader(PciCommonHeader commonHeader) {
- this.commonHeader = commonHeader;
- }
-
- /**
- * Get the action.
- *
- * @return the action
- */
- public String getAction() {
- return action;
- }
-
- /**
- * Set the action.
- *
- * @param action
- * the action to set
- */
- public void setAction(String action) {
- this.action = action;
- }
-
- /**
- * Get the payload.
- *
- * @return the payload
- */
-
- public String getPayload() {
- return payload;
- }
-
- /**
- * Set the payload.
- *
- * @param payload
- * the payload to set
- */
-
- public void setPayload(String payload) {
- this.payload = payload;
- }
-
- @Override
- public String toString() {
- return "PciRequest[commonHeader=" + commonHeader + ", action=" + action + ", payload=" + payload + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java
index b4453ad93..1355e9e7b 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequestWrapper.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,29 +23,22 @@
package org.onap.policy.sdnr;
import java.io.Serializable;
+import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString(callSuper = true)
public class PciRequestWrapper extends PciWrapper implements Serializable {
private static final long serialVersionUID = 879766924715980798L;
private PciRequest body;
-
- public PciRequestWrapper() {
- super();
- }
-
- public PciRequestWrapper(PciRequest request) {
- body = request;
- }
-
- @Override
- public String toString() {
- return "RequestWrapper [body=" + body + ", toString()=" + super.toString() + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java
index 803f126e0..4fe5c0a7d 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponse.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,11 +26,15 @@ import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
+@NoArgsConstructor
+@ToString
public class PciResponse implements Serializable {
private static final long serialVersionUID = 8375708697287669750L;
@@ -44,10 +48,6 @@ public class PciResponse implements Serializable {
@SerializedName(value = "Payload")
private String payload;
- public PciResponse() {
- // EMPTY
- }
-
/**
* Constructs a response using the common header of the request since they will
* be the same.
@@ -58,10 +58,4 @@ public class PciResponse implements Serializable {
public PciResponse(PciRequest request) {
this.commonHeader = new PciCommonHeader(request.getCommonHeader());
}
-
- @Override
- public String toString() {
- return "PciResponse[CommonHeader=" + commonHeader + ", Status=" + status + ", Payload="
- + payload + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
index 90864d42c..f6d2d8cc5 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseCode.java
@@ -24,8 +24,12 @@
package org.onap.policy.sdnr;
import java.io.Serializable;
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.onap.policy.sdnr.util.StatusCodeEnum;
+@AllArgsConstructor(access = AccessLevel.PROTECTED)
public class PciResponseCode implements Serializable {
/* These fields define the key to the response code value. */
@@ -38,15 +42,8 @@ public class PciResponseCode implements Serializable {
public static final String PARTIAL_FAILURE = "PARTIAL FAILURE";
private static final long serialVersionUID = -5371924429933449763L;
- private final Integer code;
-
- protected PciResponseCode(final int code) {
- this.code = code;
- }
-
- public int getCode() {
- return this.code;
- }
+ @Getter
+ private final int code;
@Override
public String toString() {
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java
index a41ec90bc..7321e10bd 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciResponseWrapper.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,22 +26,15 @@ import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
public class PciResponseWrapper extends PciWrapper implements Serializable {
private static final long serialVersionUID = 109837814781086802L;
private PciResponse body;
-
- public PciResponseWrapper() {
- super();
- }
-
- @Override
- public String toString() {
- return "ResponseWrapper [body=" + body + ", toString()=" + super.toString() + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java
index 3f7ca49e8..cc716b965 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciWrapper.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,10 +27,12 @@ import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
+@ToString
public class PciWrapper implements Serializable {
private static final long serialVersionUID = 375215806432396532L;
@@ -47,14 +49,4 @@ public class PciWrapper implements Serializable {
private String correlationId;
private String type;
-
- public PciWrapper() {
- // Create a default PciWrapper instance
- }
-
- @Override
- public String toString() {
- return "Wrapper [version=" + version + ", cambriaPartition=" + cambriaPartition + ", rpcName=" + rpcName
- + ", correlationId=" + correlationId + ", type=" + type + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java
index 909e5d883..53a38e414 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/Status.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,13 +24,19 @@ package org.onap.policy.sdnr;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
+import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
+import lombok.NoArgsConstructor;
import lombok.Setter;
+import lombok.ToString;
@Getter
@Setter
@EqualsAndHashCode
+@NoArgsConstructor
+@AllArgsConstructor
+@ToString
public class Status implements Serializable {
private static final long serialVersionUID = 877641506135467199L;
@@ -40,23 +46,4 @@ public class Status implements Serializable {
@SerializedName(value = "Value")
private String value;
-
- public Status() {
- // Create a default PciResponseStatus instance
- }
-
- /**
- * Constructor for the class Status.
- *
- */
- public Status(int code, String value) {
- super();
- this.code = code;
- this.value = value;
- }
-
- @Override
- public String toString() {
- return "Status [code = " + code + ", value = " + value + "]";
- }
}
diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
index 90aea71ee..d4179aa84 100644
--- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
+++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/util/Serialization.java
@@ -32,11 +32,14 @@ import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import java.time.Instant;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.onap.policy.common.gson.InstantAsMillisTypeAdapter;
import org.onap.policy.common.gson.InstantTypeAdapter;
import org.onap.policy.sdnr.PciRequest;
import org.onap.policy.sdnr.PciResponse;
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class Serialization {
public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
.registerTypeAdapter(Instant.class, new InstantTypeAdapter()).create();
@@ -48,10 +51,6 @@ public final class Serialization {
public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
.registerTypeAdapter(Instant.class, new InstantAsMillisTypeAdapter()).create();
- private Serialization() {
- // Private constructor to prevent subclassing
- }
-
public static class RequestAdapter implements JsonSerializer<PciRequest>, JsonDeserializer<PciRequest> {
@Override
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
index 9d497602f..11f408aeb 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciCommonHeaderTest.java
@@ -69,7 +69,7 @@ public class PciCommonHeaderTest {
assertNotEquals(0, commonHeader.hashCode());
- assertEquals("CommonHeader [timeStamp=", commonHeader.toString().substring(0, 24));
+ assertEquals("PciCommonHeader(timeStamp=", commonHeader.toString().substring(0, 26));
PciCommonHeader copiedPciCommonHeader = new PciCommonHeader();
copiedPciCommonHeader.setApiVer(commonHeader.getApiVer());
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
index 0bff14de9..d504dbb7b 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestTest.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ public class PciRequestTest {
assertNotEquals(0, request.hashCode());
- assertEquals("PciRequest[commonHeader=CommonHeader [timeStamp=", request.toString().substring(0, 48));
+ assertEquals("PciRequest(commonHeader=PciCommonHeader(timeStamp=", request.toString().substring(0, 50));
PciRequest copiedPciRequest = new PciRequest();
copiedPciRequest.setCommonHeader(request.getCommonHeader());
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
index a5c81bc1a..e44800e4b 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciRequestWrapperTest.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
package org.onap.policy.sdnr;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
@@ -44,7 +45,9 @@ public class PciRequestWrapperTest {
assertNotEquals(0, requestWrapper.hashCode());
- assertEquals("RequestWrapper [body=PciRequest[commonHeader=nul", requestWrapper.toString().substring(0, 48));
+ assertThat(requestWrapper.toString())
+ .startsWith("PciRequestWrapper(")
+ .contains("body=PciRequest(commonHeader=nul");
PciRequestWrapper copiedPciRequestWrapper = new PciRequestWrapper();
copiedPciRequestWrapper.setBody(requestWrapper.getBody());
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
index d496f86fe..f0b6ffb90 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciStatusTest.java
@@ -4,7 +4,7 @@
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ public class PciStatusTest {
status.setValue(THE_WONDERFUL_LAND_OF_OZ);
assertEquals(THE_WONDERFUL_LAND_OF_OZ, status.getValue());
- assertEquals("Status [code = 1234, value = The wonderfu", status.toString().substring(0, 41));
+ assertEquals("Status(code=1234, value=The wonderful", status.toString().substring(0, 37));
Status copiedStatus = new Status();
copiedStatus.setCode(status.getCode());
diff --git a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
index 91d42a3bf..708363bcc 100644
--- a/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
+++ b/models-interactions/model-impl/sdnr/src/test/java/org/onap/policy/sdnr/PciWrapperTest.java
@@ -60,7 +60,7 @@ public class PciWrapperTest {
assertNotEquals(0, wrapper.hashCode());
- assertEquals("Wrapper [version=19.3.9, cambriaPartition=The ", wrapper.toString().substring(0, 46));
+ assertEquals("PciWrapper(version=19.3.9, cambriaPartition=The ", wrapper.toString().substring(0, 48));
PciWrapper copiedPciWrapper = new PciWrapper();
copiedPciWrapper.setVersion(wrapper.getVersion());
diff --git a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java
index 51f2f9d46..8b8526259 100644
--- a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java
+++ b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/Util.java
@@ -22,6 +22,8 @@
package org.onap.policy.simulators;
import java.io.IOException;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
@@ -34,7 +36,8 @@ import org.onap.policy.models.sim.dmaap.parameters.DmaapSimParameterGroup;
import org.onap.policy.models.sim.dmaap.provider.DmaapSimProvider;
import org.onap.policy.models.sim.dmaap.rest.DmaapSimRestServer;
-public class Util {
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class Util {
public static final String AAISIM_SERVER_NAME = "aaiSim";
public static final String SOSIM_SERVER_NAME = "soSim";
public static final String VFCSIM_SERVER_NAME = "vfcSim";
@@ -53,10 +56,6 @@ public class Util {
private static final String CANNOT_CONNECT = "cannot connect to port ";
public static final String LOCALHOST = "localhost";
- private Util() {
- // Prevent instantiation of this class
- }
-
/**
* Build an A&AI simulator.
*