From ba11c9a1e41384fd065d4cb21beab3182651a066 Mon Sep 17 00:00:00 2001 From: jrh3 Date: Thu, 12 Sep 2019 14:34:30 -0400 Subject: Add yaml support to pap rest server Change-Id: I3e3d5c46bfa4f1d093e64b8be9a9720570e6000c Issue-ID: POLICY-2085 Signed-off-by: jrh3 --- .../onap/policy/pap/main/rest/PapRestControllerV1Test.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'main/src/test') diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java index 317ab1c1..d8e6963f 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java @@ -20,10 +20,13 @@ package org.onap.policy.pap.main.rest; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.util.UUID; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; import org.junit.Before; @@ -40,6 +43,14 @@ public class PapRestControllerV1Test { bldr = Response.status(Response.Status.OK); } + @Test + public void testProduces() { + Produces annotation = PapRestControllerV1.class.getAnnotation(Produces.class); + assertNotNull(annotation); + assertThat(annotation.value()).contains(MediaType.APPLICATION_JSON) + .contains(PapRestControllerV1.APPLICATION_YAML); + } + @Test public void testAddVersionControlHeaders() { Response resp = ctlr.addVersionControlHeaders(bldr).build(); -- cgit 1.2.3-korg