aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java')
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java
index fdb8770c..56ed8933 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/RestEchoService.java
@@ -22,12 +22,15 @@ package org.onap.policy.common.endpoints.http.server.test;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+
import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+
@Api(value = "echo")
@Path("/junit/echo")
public class RestEchoService {
@@ -35,11 +38,17 @@ public class RestEchoService {
@GET
@Path("{word}")
@Produces(MediaType.TEXT_PLAIN)
- @ApiOperation(
- value = "echoes back whatever received"
- )
- public String echo(@PathParam("word") String word) {
+ @ApiOperation(value = "echoes back whatever received")
+ public String echo(@PathParam("word") String word) {
return word;
}
+ @PUT
+ @Path("{word}")
+ @Produces(MediaType.TEXT_PLAIN)
+ @ApiOperation(value = "echoes back whatever received")
+ public String echoPut(@PathParam("word") String word, Object entity) {
+ return word + ":" + entity.toString();
+ }
+
}