aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-09-16 17:47:08 +0100
committerliamfallon <liam.fallon@est.tech>2022-09-21 16:15:50 +0100
commit42c9a2adf08de5d684d33f76c534241745e02aee (patch)
treedf32584f8406f41ae019726cedaa0e871f579186 /main/src/test
parentbdf2d047d2ee09cb89c817e1d50e5bbab34860f9 (diff)
Fix minor warnings in code
Issue-ID: POLICY-4045 Change-Id: I08c3cb1af3dbe2051dcbb0e2726906faff4a37b3 Signed-off-by: liamfallon <liam.fallon@est.tech>
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));
}