aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/java
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2020-01-14 11:06:29 -0600
committerHOCKLA <ah999m@att.com>2020-01-14 11:06:46 -0600
commit9df1718ae22b50e1db4223828c55e8f50d1c6a9b (patch)
tree172506313e063157da22e3200ac002b141a4d3e2 /main/src/test/java
parent2eafca87f9eeb65852303722b9d4b50b891b2468 (diff)
policy/pap jdk11 upgrades
Issue-ID: POLICY-1593 Change-Id: I61be9364d09b520e30aeac6d825b6c84574790ac Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'main/src/test/java')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java6
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java20
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java8
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java8
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java6
5 files changed, 24 insertions, 24 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java b/main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java
index a9cd7d1f..47d1de5f 100644
--- a/main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java
+++ b/main/src/test/java/org/onap/policy/pap/main/comm/CommonRequestBase.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
package org.onap.policy.pap.main.comm;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -107,7 +107,7 @@ public class CommonRequestBase {
doAnswer(new Answer<Object>() {
@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
- queue.add(invocation.getArgumentAt(0, QueueToken.class));
+ queue.add(invocation.getArgument(0, QueueToken.class));
return null;
}
}).when(publisher).enqueue(any());
diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java
index bbaf6571..db955155 100644
--- a/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java
+++ b/main/src/test/java/org/onap/policy/pap/main/comm/msgdata/UpdateReqTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
@@ -194,7 +194,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent() {
+ public void testIsSameContent() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setName("world");
assertTrue(data.isSameContent(msg2));
@@ -206,7 +206,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_BothGroupNamesNull() {
+ public void testIsSameContent_BothGroupNamesNull() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setPdpGroup(null);
update.setPdpGroup(null);
@@ -214,7 +214,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_BothSubGroupNamesNull() {
+ public void testIsSameContent_BothSubGroupNamesNull() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setPdpSubgroup(null);
update.setPdpSubgroup(null);
@@ -222,7 +222,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_DiffGroup() {
+ public void testIsSameContent_DiffGroup() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setPdpGroup(null);
assertFalse(data.isSameContent(msg2));
@@ -235,7 +235,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_DiffSubGroup() {
+ public void testIsSameContent_DiffSubGroup() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setPdpSubgroup(null);
assertFalse(data.isSameContent(msg2));
@@ -248,7 +248,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_DiffPolicies() {
+ public void testIsSameContent_DiffPolicies() {
PdpUpdate msg2 = new PdpUpdate(update);
ArrayList<ToscaPolicy> policies = new ArrayList<>(update.getPolicies());
@@ -259,7 +259,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_DiffPolicies_NotNull_Null() {
+ public void testIsSameContent_DiffPolicies_NotNull_Null() {
PdpUpdate msg2 = new PdpUpdate(update);
msg2.setPolicies(null);
@@ -267,7 +267,7 @@ public class UpdateReqTest extends CommonRequestBase {
}
@Test
- public void isSameContent_DiffPolicies_Null_NotNull() {
+ public void testIsSameContent_DiffPolicies_Null_NotNull() {
PdpUpdate msg2 = new PdpUpdate(update);
update.setPolicies(null);
diff --git a/main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java b/main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java
index 8c84337a..478c63c9 100644
--- a/main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java
+++ b/main/src/test/java/org/onap/policy/pap/main/notification/PolicyNotifierTest.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@ package org.onap.policy.pap.main.notification;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
@@ -316,7 +316,7 @@ public class PolicyNotifierTest extends PolicyCommonSupport {
private Answer<Void> addStatus(int listIndex, PolicyStatus... status) {
return invocation -> {
@SuppressWarnings("unchecked")
- List<PolicyStatus> statusList = invocation.getArgumentAt(listIndex, List.class);
+ List<PolicyStatus> statusList = invocation.getArgument(listIndex, List.class);
statusList.addAll(Arrays.asList(status));
return null;
};
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java b/main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java
index 852516b7..a0fa196e 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/ProviderSuper.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
package org.onap.policy.pap.main.rest;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -101,8 +101,8 @@ public class ProviderSuper {
when(dao.getFilteredPdpGroups(any())).thenReturn(groups);
- when(dao.createPdpGroups(any())).thenAnswer(answer -> answer.getArgumentAt(0, List.class));
- when(dao.updatePdpGroups(any())).thenAnswer(answer -> answer.getArgumentAt(0, List.class));
+ when(dao.createPdpGroups(any())).thenAnswer(answer -> answer.getArgument(0, List.class));
+ when(dao.updatePdpGroups(any())).thenAnswer(answer -> answer.getArgument(0, List.class));
Registry.register(PapConstants.REG_PDP_MODIFY_LOCK, lockit);
Registry.register(PapConstants.REG_PDP_MODIFY_MAP, reqmap);
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java
index 1f7c6d0f..985ff904 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyStatusControllerV1.java
@@ -1,7 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class TestPolicyStatusControllerV1 extends CommonPapRestServer {
}
@Test
- public void queryAllDeployedPolicies() throws Exception {
+ public void testQueryAllDeployedPolicies() throws Exception {
String uri = POLICY_STATUS_ENDPOINT;
// verify it fails when no authorization info is included
@@ -63,7 +63,7 @@ public class TestPolicyStatusControllerV1 extends CommonPapRestServer {
}
@Test
- public void queryDeployedPolicy() throws Exception {
+ public void testQueryDeployedPolicy() throws Exception {
String uri = POLICY_STATUS_ENDPOINT + "/my-name/1.2.3";
Invocation.Builder invocationBuilder = sendRequest(uri);