summaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java9
1 files changed, 3 insertions, 6 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 f8e47ef4..1af9ff55 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
@@ -42,9 +42,6 @@ public class PapRestControllerV1Test {
@Mock
SecurityContext mockSecurityContext;
- @InjectMocks
- PapRestControllerV1 mockController;
-
private AutoCloseable closeable;
private BodyBuilder bldr;
@@ -61,7 +58,7 @@ public class PapRestControllerV1Test {
@Test
public void testAddVersionControlHeaders() {
- ResponseEntity<Object> resp = mockController.addVersionControlHeaders(bldr).build();
+ ResponseEntity<Object> resp = PapRestControllerV1.addVersionControlHeaders(bldr).build();
assertEquals("0", resp.getHeaders().get(PapRestControllerV1.VERSION_MINOR_NAME).get(0));
assertEquals("0", resp.getHeaders().get(PapRestControllerV1.VERSION_PATCH_NAME).get(0));
assertEquals("1.0.0", resp.getHeaders().get(PapRestControllerV1.VERSION_LATEST_NAME).get(0));
@@ -69,14 +66,14 @@ public class PapRestControllerV1Test {
@Test
public void testAddLoggingHeaders_Null() {
- ResponseEntity<Object> resp = mockController.addLoggingHeaders(bldr, null).build();
+ ResponseEntity<Object> resp = PapRestControllerV1.addLoggingHeaders(bldr, null).build();
assertNotNull(resp.getHeaders().get(PapRestControllerV1.REQUEST_ID_NAME));
}
@Test
public void testAddLoggingHeaders_NonNull() {
UUID uuid = UUID.randomUUID();
- ResponseEntity<Object> resp = mockController.addLoggingHeaders(bldr, uuid).build();
+ ResponseEntity<Object> resp = PapRestControllerV1.addLoggingHeaders(bldr, uuid).build();
assertEquals(uuid.toString(), resp.getHeaders().get(PapRestControllerV1.REQUEST_ID_NAME).get(0));
}