diff options
Diffstat (limited to 'main/src/test')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java | 11 |
1 files changed, 11 insertions, 0 deletions
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; @@ -41,6 +44,14 @@ public class PapRestControllerV1Test { } @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(); assertEquals("0", resp.getHeaderString(PapRestControllerV1.VERSION_MINOR_NAME)); |