From 9f0fbd02f184071c2de30c944bec311741e6180e Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Tue, 16 Feb 2021 16:56:47 +0000 Subject: PAP Deployment API changes - change url to uri Change-Id: I6fa4b001a0c4573a34e1cefe0d32ca969ca5096e Issue-ID: POLICY-2526 Signed-off-by: a.sreekumar --- .../models/pap/concepts/PdpGroupDeployResponse.java | 12 +++++++----- .../models/pap/concepts/PdpGroupDeployResponseTest.java | 15 ++++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java index 60f76e29a..6d94d7110 100644 --- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java +++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponse.java @@ -22,6 +22,7 @@ package org.onap.policy.models.pap.concepts; import lombok.Getter; +import lombok.NoArgsConstructor; import lombok.Setter; import lombok.ToString; @@ -31,6 +32,7 @@ import lombok.ToString; @Getter @Setter @ToString(callSuper = true) +@NoArgsConstructor public class PdpGroupDeployResponse extends SimpleResponse { /** @@ -39,18 +41,18 @@ public class PdpGroupDeployResponse extends SimpleResponse { private String message; /** - * Url to fetch the deployment status. + * URI to fetch the deployment status. */ - private String url; + private String uri; /** * Constructs the object. * * @param message the message - * @param url the url to get actual deployment status + * @param uri the uri to get actual deployment status */ - public PdpGroupDeployResponse(String message, String url) { + public PdpGroupDeployResponse(String message, String uri) { this.message = message; - this.url = url; + this.uri = uri; } } diff --git a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java index 178687daa..d3b8cc497 100644 --- a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java +++ b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PdpGroupDeployResponseTest.java @@ -29,21 +29,26 @@ import org.junit.Test; */ public class PdpGroupDeployResponseTest { - private static final String URL = "/policy/pap/v1/policies/status"; + private static final String URI = "/policy/pap/v1/policies/status"; private static final String MESSAGE = "the message"; @Test public void testPdpGroupDeployResponse() { - assertNotNull(new PdpGroupDeployResponse("message", "url")); + assertNotNull(new PdpGroupDeployResponse("message", "uri")); assertNotNull(new PdpGroupDeployResponse("message", null)); assertNotNull(new PdpGroupDeployResponse(null, null)); + assertNotNull(new PdpGroupDeployResponse()); - PdpGroupDeployResponse resp = new PdpGroupDeployResponse(MESSAGE, URL); + PdpGroupDeployResponse resp = new PdpGroupDeployResponse(MESSAGE, URI); assertEquals(MESSAGE, resp.getMessage()); - assertEquals(URL, resp.getUrl()); + assertEquals(URI, resp.getUri()); resp = new PdpGroupDeployResponse(null, null); assertNull(resp.getMessage()); - assertNull(resp.getUrl()); + assertNull(resp.getUri()); + + resp = new PdpGroupDeployResponse(); + assertNull(resp.getMessage()); + assertNull(resp.getUri()); } } -- cgit 1.2.3-korg