From 956a7b52188918f0f2d301a06bf0a2e31249168f Mon Sep 17 00:00:00 2001 From: "Hockla, Ali (ah999m)" Date: Mon, 13 Jan 2020 14:11:46 -0600 Subject: policy/drools-pdp jdk11 upgrades Issue-ID: POLICY-1589 Change-Id: I0ed05c6e471a7da6658e02a4ba3115d3a117cedd Signed-off-by: Hockla, Ali (ah999m) --- api-active-standby-management/pom.xml | 9 +- api-state-management/pom.xml | 6 +- feature-active-standby-management/pom.xml | 4 +- feature-distributed-locking/pom.xml | 9 +- .../locking/DistributedLockManagerTest.java | 8 +- feature-drools-init/pom.xml | 4 +- .../drools/droolsinit/DroolsInitFeatureTest.java | 6 +- .../org/onap/policy/drools/eelf/test/EElfTest.java | 4 +- feature-healthcheck/pom.xml | 11 +- feature-lifecycle/pom.xml | 9 +- .../drools/lifecycle/LifecycleStateActiveTest.java | 12 +- .../lifecycle/LifecycleStatePassiveTest.java | 12 +- .../lifecycle/LifecycleStateTerminatedTest.java | 22 +- .../server/restful/RestLifecycleManagerTest.java | 4 +- feature-mdc-filters/pom.xml | 244 ++++++++++----------- .../drools/mdc/filters/MdcTopicFilterTest.java | 8 +- feature-pooling-dmaap/pom.xml | 5 +- feature-session-persistence/pom.xml | 6 +- .../drools/persistence/DroolsSessionEntity.java | 5 +- .../persistence/JpaDroolsSessionConnectorTest.java | 4 +- .../drools/persistence/PersistenceFeatureTest.java | 8 +- feature-simulators/pom.xml | 8 +- feature-state-management/pom.xml | 4 +- .../statemanagement/StateManagementProperties.java | 5 +- feature-test-transaction/pom.xml | 8 +- .../TestTransactionAdditionalTest.java | 8 +- .../testtransaction/TestTransactionTest.java | 4 +- policy-core/pom.xml | 6 +- .../drools/core/PolicySessionFeatureApi.java | 14 +- .../java/org/onap/policy/drools/util/KieUtils.java | 11 +- .../onap/policy/drools/core/PolicySessionTest.java | 6 +- .../onap/policy/drools/core/lock/LockImplTest.java | 4 +- .../org/onap/policy/drools/util/KieUtilsTest.java | 8 +- policy-management/pom.xml | 6 +- .../java/org/onap/policy/drools/system/Main.java | 5 +- .../controller/DroolsControllerFactoryTest.java | 12 +- .../internal/MavenDroolsController2Test.java | 4 +- .../internal/MavenDroolsControllerTest.java | 4 +- .../internal/NullDroolsControllerTest.java | 6 +- .../server/restful/test/RestManagerTest.java | 6 +- .../drools/system/PolicyControllerFactoryTest.java | 4 +- .../drools/system/PolicyEngineManagerTest.java | 6 +- .../internal/AggregatedPolicyControllerTest.java | 4 +- .../system/internal/FeatureLockImplTest.java | 4 +- .../drools/system/internal/LockManagerTest.java | 6 +- .../system/internal/SimpleLockManagerTest.java | 8 +- policy-utils/pom.xml | 4 +- .../onap/policy/drools/utils/PairTripleTest.java | 6 +- .../policy/drools/utils/ReflectionUtilTest.java | 4 +- .../drools/utils/logging/MdcTransactionTest.java | 12 +- pom.xml | 12 +- 51 files changed, 281 insertions(+), 318 deletions(-) diff --git a/api-active-standby-management/pom.xml b/api-active-standby-management/pom.xml index 25074a71..13cf69e3 100644 --- a/api-active-standby-management/pom.xml +++ b/api-active-standby-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ECOMP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017, 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. @@ -33,11 +33,6 @@ api-active-standby-management API for Active Standby Management feature - - 1.8 - 1.8 - - org.onap.policy.drools-pdp @@ -63,7 +58,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/api-state-management/pom.xml b/api-state-management/pom.xml index 7ede7691..cf54e4fc 100644 --- a/api-state-management/pom.xml +++ b/api-state-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017, 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. @@ -34,8 +34,6 @@ Separately loadable module for state management APIe - 1.8 - 1.8 1.5.0 @@ -75,7 +73,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/feature-active-standby-management/pom.xml b/feature-active-standby-management/pom.xml index 80dedac9..eb51ae7c 100644 --- a/feature-active-standby-management/pom.xml +++ b/feature-active-standby-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= feature-active-standby-management ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-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. @@ -94,7 +94,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/feature-distributed-locking/pom.xml b/feature-distributed-locking/pom.xml index 1b6063b0..50095041 100644 --- a/feature-distributed-locking/pom.xml +++ b/feature-distributed-locking/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2018-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. @@ -33,11 +33,6 @@ feature-distributed-locking Loadable module that provides distributed locking capability - - 1.8 - 1.8 - - @@ -123,7 +118,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java index 5351f004..065795be 100644 --- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java +++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java @@ -29,10 +29,10 @@ import static org.junit.Assert.assertNotNull; 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.Matchers.anyBoolean; -import static org.mockito.Matchers.anyLong; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/feature-drools-init/pom.xml b/feature-drools-init/pom.xml index 6694d8a5..705a12f3 100644 --- a/feature-drools-init/pom.xml +++ b/feature-drools-init/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - 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. @@ -73,7 +73,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-drools-init/src/test/java/org/onap/policy/drools/droolsinit/DroolsInitFeatureTest.java b/feature-drools-init/src/test/java/org/onap/policy/drools/droolsinit/DroolsInitFeatureTest.java index 36e64960..28b4d5e9 100644 --- a/feature-drools-init/src/test/java/org/onap/policy/drools/droolsinit/DroolsInitFeatureTest.java +++ b/feature-drools-init/src/test/java/org/onap/policy/drools/droolsinit/DroolsInitFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-drools-init * ================================================================================ - * 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. @@ -22,7 +22,7 @@ package org.onap.policy.drools.droolsinit; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -85,7 +85,7 @@ public class DroolsInitFeatureTest { } @Test - public void initTest() { + public void testInit() { FactHandle factHandle = mock(FactHandle.class); when(kieSession.insert(any())).thenReturn(factHandle); when(kieSession.getObject(factHandle)).thenReturn(new Object()); diff --git a/feature-eelf/src/test/java/org/onap/policy/drools/eelf/test/EElfTest.java b/feature-eelf/src/test/java/org/onap/policy/drools/eelf/test/EElfTest.java index 271fd4a5..c0f271cf 100644 --- a/feature-eelf/src/test/java/org/onap/policy/drools/eelf/test/EElfTest.java +++ b/feature-eelf/src/test/java/org/onap/policy/drools/eelf/test/EElfTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-eelf * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -84,7 +84,7 @@ public class EElfTest { } @Test - public void slf4jLog() { + public void testSlf4jLog() { /* standard slf4j using defaults */ diff --git a/feature-healthcheck/pom.xml b/feature-healthcheck/pom.xml index abcf2909..47d389a9 100644 --- a/feature-healthcheck/pom.xml +++ b/feature-healthcheck/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-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. @@ -33,11 +33,6 @@ feature-healthcheck Loadable module that performs remote system healthchecks - - 1.8 - 1.8 - - @@ -99,7 +94,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true @@ -149,7 +144,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-lifecycle/pom.xml b/feature-lifecycle/pom.xml index 66da4614..b57847a3 100644 --- a/feature-lifecycle/pom.xml +++ b/feature-lifecycle/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP ================================================================================ - 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. @@ -33,11 +33,6 @@ feature-lifecycle Loadable module to support the lifecycle modes - - 1.8 - 1.8 - - @@ -116,7 +111,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java index 2a258305..7fc7fd29 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java @@ -84,7 +84,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void start() { + public void testStart() { assertActive(); assertFalse(fsm.start()); assertActive(); @@ -101,7 +101,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void stop() { + public void testStop() { assertTrue(fsm.stop()); assertBasicTerminated(); @@ -116,7 +116,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void shutdown() { + public void testShutdown() { fsm.shutdown(); assertBasicTerminated(); @@ -126,7 +126,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void status() { + public void testStatus() { waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE)); int preCount = fsm.client.getSink().getRecentEvents().length; @@ -142,7 +142,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void stateChange() throws CoderException { + public void testStateChange() throws CoderException { assertActive(); /* no name and mismatching group info */ @@ -179,7 +179,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { } @Test - public void update() throws IOException, CoderException { + public void testUpdate() throws IOException, CoderException { // TODO: extract repeated similar assertion blocks into their own helper methods diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java index f242e4c6..60d71d0c 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java @@ -71,7 +71,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void controller() { + public void testController() { fsm.start(controllerSupport.getController()); assertSame(controllerSupport.getController(), fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE, @@ -85,7 +85,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void start() { + public void testStart() { assertEquals(0, fsm.client.getSink().getRecentEvents().length); assertFalse(fsm.start()); assertBasicPassive(); @@ -110,7 +110,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void shutdown() throws Exception { + public void testShutdown() throws Exception { simpleStop(); fsm.shutdown(); @@ -118,7 +118,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void status() { + public void testStatus() { assertTrue(fsm.client.getSink().isAlive()); assertTrue(fsm.status()); assertSame(0, fsm.client.getSink().getRecentEvents().length); @@ -139,7 +139,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void update() throws IOException, CoderException { + public void testUpdate() throws IOException, CoderException { controllerSupport.getController().getDrools().delete(ToscaPolicy.class); assertEquals(0, controllerSupport.getController().getDrools().factCount("junits")); @@ -240,7 +240,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { } @Test - public void stateChange() throws CoderException, IOException { + public void testStateChange() throws CoderException, IOException { /* no name */ PdpStateChange change = new PdpStateChange(); change.setPdpGroup("A"); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java index 353525d6..7c94e52c 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -57,7 +57,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void constructor() { + public void testConstructor() { assertThatIllegalArgumentException().isThrownBy(() -> new LifecycleStateTerminated(null)); LifecycleState state = new LifecycleStateTerminated(new LifecycleFsm()); @@ -71,7 +71,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void stop() { + public void testStop() { assertEquals(PdpState.TERMINATED, fsm.state.state()); assertFalse(fsm.isAlive()); @@ -89,7 +89,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void bounce() { + public void testBounce() { assertBasicTerminated(); simpleStart(); simpleStop(); @@ -101,12 +101,12 @@ public class LifecycleStateTerminatedTest { @Test public void doubleBounce() { - bounce(); - bounce(); + testBounce(); + testBounce(); } @Test - public void doubleStartBounce() { + public void testDoubleStartBounce() { simpleStart(); assertFalse(fsm.start()); assertBasicPassive(); @@ -114,7 +114,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void shutdown() { + public void testShutdown() { assertBasicTerminated(); fsm.shutdown(); assertBasicTerminated(); @@ -123,7 +123,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void status() { + public void testStatus() { assertBasicTerminated(); assertFalse(fsm.status()); assertBasicTerminated(); @@ -136,7 +136,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void update() { + public void testUpdate() { PdpUpdate update = new PdpUpdate(); update.setName(NetworkUtil.getHostname()); update.setPdpGroup("A"); @@ -151,7 +151,7 @@ public class LifecycleStateTerminatedTest { } @Test - public void stateChange() { + public void testStateChange() { PdpStateChange change = new PdpStateChange(); change.setPdpGroup("A"); change.setPdpSubgroup("a"); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java index da7435f3..37be4ac7 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/server/restful/RestLifecycleManagerTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * 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. @@ -80,7 +80,7 @@ public class RestLifecycleManagerTest { } @Test - public void fsm() { + public void testFsm() { Response response = HttpClientFactoryInstance.getClientFactory().get("lifecycle").get("fsm"); assertNotNull(HttpClient.getBody(response, String.class)); assertEquals(Status.OK.getStatusCode(), response.getStatus()); diff --git a/feature-mdc-filters/pom.xml b/feature-mdc-filters/pom.xml index 89c09e3b..a6580d24 100755 --- a/feature-mdc-filters/pom.xml +++ b/feature-mdc-filters/pom.xml @@ -1,125 +1,119 @@ - - - - 4.0.0 - - drools-pdp - org.onap.policy.drools-pdp - 1.6.0-SNAPSHOT - - - feature-mdc-filters - - feature-mdc-filters - Loadable module that marks key fields in messages through logback mdc. - - - 1.8 - 1.8 - - - - - - maven-assembly-plugin - - - zipfile - - single - - package - - true - ${project.artifactId}-${project.version} - - src/assembly/assemble_zip.xml - - false - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - ${project.build.directory}/assembly/lib - false - true - true - false - false - false - runtime - true - - - - - - - - - - - org.onap.policy.common - policy-endpoints - ${policy.common.version} - provided - - - - org.onap.policy.drools-pdp - policy-management - ${project.version} - provided - - - - org.mockito - mockito-core - 2.13.0 - test - - - - org.assertj - assertj-core - test - - - - junit - junit - test - - - - + + + + 4.0.0 + + drools-pdp + org.onap.policy.drools-pdp + 1.6.0-SNAPSHOT + + + feature-mdc-filters + + feature-mdc-filters + Loadable module that marks key fields in messages through logback mdc. + + + + + maven-assembly-plugin + + + zipfile + + single + + package + + true + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + false + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + runtime + true + + + + + + + + + + + org.onap.policy.common + policy-endpoints + ${policy.common.version} + provided + + + + org.onap.policy.drools-pdp + policy-management + ${project.version} + provided + + + + org.mockito + mockito-core + test + + + + org.assertj + assertj-core + test + + + + junit + junit + test + + + + diff --git a/feature-mdc-filters/src/test/java/org/onap/policy/drools/mdc/filters/MdcTopicFilterTest.java b/feature-mdc-filters/src/test/java/org/onap/policy/drools/mdc/filters/MdcTopicFilterTest.java index 7fd65a29..e1a9b9b8 100755 --- a/feature-mdc-filters/src/test/java/org/onap/policy/drools/mdc/filters/MdcTopicFilterTest.java +++ b/feature-mdc-filters/src/test/java/org/onap/policy/drools/mdc/filters/MdcTopicFilterTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-mdc-filters * ================================================================================ - * 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. @@ -310,7 +310,7 @@ public class MdcTopicFilterTest { } @Test - public void modifyFilterRuleMultiPathExceptionTest() { + public void testModifyFilterRuleMultiPathException() { MdcTopicFilter filter = new MdcTopicFilter("abc=$a.value"); assertThatIllegalArgumentException() .isThrownBy(() -> filter.modifyFilterRule("def", "abc", Arrays.asList("$.b", "$.c"))) @@ -562,7 +562,7 @@ public class MdcTopicFilterTest { } @Test - public void findAllNotFoundTest() { + public void testFindAllNotFound() { String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\"," + "\"controllers\":[{\"name\":\"test-controller\"," + "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\"," @@ -593,7 +593,7 @@ public class MdcTopicFilterTest { } @Test - public void findNotFoundTest() { + public void testFindNotFound() { String message = "{\"requestID\":\"38adde30-cc22-11e8-a8d5-f2801f1b9fd1\",\"entity\":\"controller\"," + "\"controllers\":[{\"name\":\"test-controller\"," + "\"drools\":{\"groupId\":\"org.onap.policy.drools.test\"," diff --git a/feature-pooling-dmaap/pom.xml b/feature-pooling-dmaap/pom.xml index 21786a14..0b2a3b07 100644 --- a/feature-pooling-dmaap/pom.xml +++ b/feature-pooling-dmaap/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2018-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. @@ -34,8 +34,6 @@ Endpoints - 1.8 - 1.8 9.3.20.v20170531 @@ -143,7 +141,6 @@ org.mockito mockito-core - 2.13.0 test diff --git a/feature-session-persistence/pom.xml b/feature-session-persistence/pom.xml index c47edbc5..ed479d70 100644 --- a/feature-session-persistence/pom.xml +++ b/feature-session-persistence/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2018, 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. @@ -34,8 +34,6 @@ Separately loadable feature module with session persistence code - 1.8 - 1.8 @@ -109,7 +107,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java index 117e6410..447835a6 100644 --- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java +++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/DroolsSessionEntity.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-session-persistence * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -51,7 +51,8 @@ public class DroolsSessionEntity implements Serializable, DroolsSession { @Column(name = "updatedDate", nullable = false) private Date updatedDate; - public DroolsSessionEntity() {} + public DroolsSessionEntity() { + } public DroolsSessionEntity(String sessionName, long sessionId) { this.sessionName = sessionName; diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnectorTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnectorTest.java index def8f2ec..d1962b60 100644 --- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnectorTest.java +++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/JpaDroolsSessionConnectorTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-session-persistence * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -22,7 +22,7 @@ package org.onap.policy.drools.persistence; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java index e15f57ce..97b6874a 100644 --- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java +++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/PersistenceFeatureTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-session-persistence * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -26,9 +26,9 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyLong; -import static org.mockito.Matchers.anyString; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/feature-simulators/pom.xml b/feature-simulators/pom.xml index 58f3c164..ae962b3f 100644 --- a/feature-simulators/pom.xml +++ b/feature-simulators/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017, 2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,11 +34,6 @@ feature-simulators - - 1.8 - 1.8 - - junit @@ -48,7 +43,6 @@ org.mockito mockito-core - 2.13.0 test diff --git a/feature-state-management/pom.xml b/feature-state-management/pom.xml index b20d76d1..8773aecb 100644 --- a/feature-state-management/pom.xml +++ b/feature-state-management/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= feature-state-management ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-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. @@ -94,7 +94,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java index 471745d4..c4d38817 100644 --- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java +++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/StateManagementProperties.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-state-management * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -63,7 +63,8 @@ public class StateManagementProperties { private static Properties properties = null; - private StateManagementProperties() {} + private StateManagementProperties() { + } /** * Initialize the parameter values from the feature-state-management.properties file values. diff --git a/feature-test-transaction/pom.xml b/feature-test-transaction/pom.xml index e06ba829..04dbdfa2 100644 --- a/feature-test-transaction/pom.xml +++ b/feature-test-transaction/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= feature-test-transaction ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-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. @@ -31,8 +31,6 @@ Separately loadable module which sends test transaction through system - 1.8 - 1.8 @@ -96,7 +94,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true @@ -133,7 +131,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java index 352779df..7a32e549 100644 --- a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java +++ b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionAdditionalTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-test-transaction * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -24,9 +24,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyString; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java index e3c2ed91..f8a8cc20 100644 --- a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java +++ b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * feature-test-transaction * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -70,7 +70,7 @@ public class TestTransactionTest { } @Test - public void registerUnregisterTest() throws InterruptedException { + public void testRegisterUnregister() throws InterruptedException { final Properties controllerProperties = new Properties(); controllerProperties.put(DroolsPropertyConstants.PROPERTY_CONTROLLER_NAME, TEST_CONTROLLER_NAME); final PolicyController controller = diff --git a/policy-core/pom.xml b/policy-core/pom.xml index 25b099c0..632cb1ae 100644 --- a/policy-core/pom.xml +++ b/policy-core/pom.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Bell Canada. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -101,7 +101,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test @@ -136,7 +136,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java index 181fbe55..535b1d8b 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java +++ b/policy-core/src/main/java/org/onap/policy/drools/core/PolicySessionFeatureApi.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-core * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -40,7 +40,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param args standard 'main' arguments, which are currently ignored * @param configDir the relative directory containing configuration files */ - default void globalInit(String[] args, String configDir) {} + default void globalInit(String[] args, String configDir) { + } /** * This method is used to create a 'KieSession' as part of a @@ -67,7 +68,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * * @param policySession the new 'PolicySession' instance */ - default void newPolicySession(PolicySession policySession) {} + default void newPolicySession(PolicySession policySession) { + } /** * This method is called to select the 'ThreadModel' instance associated @@ -98,7 +100,8 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - default void disposeKieSession(PolicySession policySession) {} + default void disposeKieSession(PolicySession policySession) { + } /** * This method is called after 'KieSession.destroy()' is called. @@ -106,5 +109,6 @@ public interface PolicySessionFeatureApi extends OrderedService { * @param policySession the 'PolicySession' object that wrapped the * 'KieSession' */ - default void destroyKieSession(PolicySession policySession) {} + default void destroyKieSession(PolicySession policySession) { + } } diff --git a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java index bd1c6cee..c260924b 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java +++ b/policy-core/src/main/java/org/onap/policy/drools/util/KieUtils.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -24,18 +24,17 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; -import java.nio.charset.StandardCharsets; import java.nio.file.Files; -import java.nio.file.Path; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.stream.Collectors; + import lombok.NonNull; + import org.apache.commons.io.IOUtils; import org.drools.compiler.kie.builder.impl.InternalKieModule; import org.drools.compiler.kproject.models.KieModuleModelImpl; @@ -74,7 +73,7 @@ public class KieUtils { * Installs a rules artifact in the local maven repository. */ public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, @NonNull List drls) - throws IOException { + throws IOException { KieModuleModel kieModule = KieModuleModelImpl.fromXML(kmodule); final KieFileSystem kieFileSystem = KieServices.Factory.get().newKieFileSystem(); @@ -92,7 +91,7 @@ public class KieUtils { * Installs a rules artifact in the local maven repository. */ public static ReleaseId installArtifact(File kmodule, File pom, String drlKJarPath, File drl) - throws IOException { + throws IOException { return installArtifact(kmodule, pom, drlKJarPath, Collections.singletonList(drl)); } diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java index c21ce7de..1ed27890 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/core/PolicySessionTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018, 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. @@ -135,7 +135,9 @@ public class PolicySessionTest { } @Override - public void start() {} + public void start() { + // do nothing + } }; model.updated(); diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java index aab04dc4..902f3043 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/core/lock/LockImplTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -29,7 +29,7 @@ import static org.junit.Assert.assertNotNull; 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.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java b/policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java index 89ab9d0a..97110744 100644 --- a/policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java +++ b/policy-core/src/test/java/org/onap/policy/drools/util/KieUtilsTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -65,7 +65,7 @@ public class KieUtilsTest { } @Test - public void installArtifact() throws IOException { + public void testInstallArtifact() throws IOException { ReleaseId releaseId = KieUtils.installArtifact( Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(), @@ -77,7 +77,7 @@ public class KieUtilsTest { } @Test - public void installArtifactList() throws IOException { + public void testInstallArtifactList() throws IOException { ReleaseId releaseId = KieUtils.installArtifact( Paths.get("src/test/resources/drools-artifact-1.1/src/main/resources/META-INF/kmodule.xml").toFile(), @@ -124,7 +124,7 @@ public class KieUtilsTest { } @Test - public void resourceToPackagesTests() { + public void testResourceToPackages() { // Some minimal logging -- it would be nice to verify the 'KieUtils' logger messages StringBuffer log; diff --git a/policy-management/pom.xml b/policy-management/pom.xml index 3aa22164..f73fe44c 100644 --- a/policy-management/pom.xml +++ b/policy-management/pom.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2019 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -142,7 +142,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true @@ -250,7 +250,7 @@ org.powermock - powermock-api-mockito + powermock-api-mockito2 test diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java index 3451587b..da4e1548 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/Main.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/Main.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -42,7 +42,8 @@ public class Main { protected static final String SYSTEM_SYMM_KEY = "engine.symm.key"; /** constructor (hides public default one). */ - private Main() {} + private Main() { + } /** * main. diff --git a/policy-management/src/test/java/org/onap/policy/drools/controller/DroolsControllerFactoryTest.java b/policy-management/src/test/java/org/onap/policy/drools/controller/DroolsControllerFactoryTest.java index 67026c0a..7733ca1f 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/controller/DroolsControllerFactoryTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/controller/DroolsControllerFactoryTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-management * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -32,7 +32,7 @@ import org.junit.Test; public class DroolsControllerFactoryTest { @Test - public void buildNullController() { + public void testBuildNullController() { Properties droolsProps = new Properties(); DroolsController droolsController = DroolsControllerConstants.getFactory().build(droolsProps, null, null); @@ -42,7 +42,7 @@ public class DroolsControllerFactoryTest { } @Test - public void getNullController() { + public void testGetNullController() { DroolsController controller = DroolsControllerConstants.getFactory().get(DroolsControllerConstants.NO_GROUP_ID, DroolsControllerConstants.NO_ARTIFACT_ID, DroolsControllerConstants.NO_VERSION); @@ -54,7 +54,7 @@ public class DroolsControllerFactoryTest { } @Test - public void inventory() { + public void testInventory() { List controllers = DroolsControllerConstants.getFactory().inventory(); assertNotNull(controllers); @@ -66,14 +66,14 @@ public class DroolsControllerFactoryTest { } @Test - public void shutdown() { + public void testShutdown() { DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory(); droolsFactory.shutdown(); assertTrue(droolsFactory.inventory().isEmpty()); } @Test - public void destroy() { + public void testDestroy() { DroolsControllerFactory droolsFactory = new IndexedDroolsControllerFactory(); droolsFactory.destroy(); assertTrue(droolsFactory.inventory().isEmpty()); diff --git a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java index 7187ad1b..2c248483 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java +++ b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsController2Test.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -27,7 +27,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; 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.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java index e99e044a..b39276d9 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -78,7 +78,7 @@ public class MavenDroolsControllerTest { } @Test - public void lock() throws InterruptedException { + public void testLock() throws InterruptedException { DroolsController controller = createDroolsController(30000L); controller.lock(); diff --git a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.java b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.java index 8515582d..4f9b59d2 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -29,7 +29,7 @@ import org.onap.policy.drools.controller.DroolsControllerConstants; public class NullDroolsControllerTest { @Test - public void start() { + public void testStart() { DroolsController controller = new NullDroolsController(); controller.start(); Assert.assertFalse(controller.isAlive()); @@ -47,7 +47,7 @@ public class NullDroolsControllerTest { } @Test - public void lock() { + public void testLock() { DroolsController controller = new NullDroolsController(); controller.lock(); Assert.assertFalse(controller.isLocked()); diff --git a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java index 237bd4df..1afac164 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/server/restful/test/RestManagerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-management * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-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. @@ -187,7 +187,7 @@ public class RestManagerTest { @Test - public void putDeleteTest() throws IOException { + public void testPutDelete() throws IOException { HttpDelete httpDelete; CloseableHttpResponse response; @@ -394,7 +394,7 @@ public class RestManagerTest { } @Test - public void getTest() throws IOException { + public void testGet() throws IOException { HttpGet httpGet; CloseableHttpResponse response; diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java index 8e5cf791..1c5eb61d 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -24,7 +24,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java index 397e9539..412e704a 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -29,8 +29,8 @@ import static org.junit.Assert.assertNotNull; 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.Matchers.anyLong; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java index 695893d4..cd0d0571 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/FeatureLockImplTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/FeatureLockImplTest.java index a224a636..b438853f 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/FeatureLockImplTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/FeatureLockImplTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -28,7 +28,7 @@ import static org.junit.Assert.assertNotNull; 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.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java index 6b6e7363..01d7be98 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/LockManagerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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,7 +23,7 @@ package org.onap.policy.drools.system.internal; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -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.never; @@ -64,7 +64,7 @@ public class LockManagerTest { MockitoAnnotations.initMocks(this); doAnswer(args -> { - args.getArgumentAt(0, Runnable.class).run(); + args.getArgument(0, Runnable.class).run(); return null; }).when(exsvc).execute(any()); diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerTest.java index b1c34c24..f60c4595 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/SimpleLockManagerTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * 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. @@ -29,9 +29,9 @@ import static org.junit.Assert.assertNotNull; 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.Matchers.anyBoolean; -import static org.mockito.Matchers.anyLong; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; diff --git a/policy-utils/pom.xml b/policy-utils/pom.xml index b3a1e275..1bc680ba 100644 --- a/policy-utils/pom.xml +++ b/policy-utils/pom.xml @@ -3,7 +3,7 @@ ============LICENSE_START======================================================= ONAP Policy Engine - Drools PDP ================================================================================ - Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017, 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. @@ -68,7 +68,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/PairTripleTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/PairTripleTest.java index fa8a62c8..ee376ba8 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/PairTripleTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/PairTripleTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-utils * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -28,7 +28,7 @@ import org.junit.Test; public class PairTripleTest { @Test - public void pairTest() { + public void testPair() { Pair pair = new Pair("foo", "bar"); assertEquals("foo", pair.first()); @@ -49,7 +49,7 @@ public class PairTripleTest { } @Test - public void tripleTest() { + public void testTriple() { Triple triple = new Triple("foo", "bar", "fiz"); assertEquals("foo", triple.first()); diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java index 706c5f24..efcef272 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-utils * ================================================================================ - * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 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. @@ -39,7 +39,7 @@ public class ReflectionUtilTest { } @Test - public void reflectionTest() { + public void testReflection() { try { diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/MdcTransactionTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/MdcTransactionTest.java index 76fee77a..4a7da81c 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/MdcTransactionTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/MdcTransactionTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-utils * ================================================================================ - * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018-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. @@ -32,7 +32,7 @@ import org.slf4j.MDC; public class MdcTransactionTest { @Test - public void resetSubTransaction() { + public void testResetSubTransaction() { MdcTransaction trans = MdcTransaction.newTransaction(null, null).resetSubTransaction(); @@ -115,7 +115,7 @@ public class MdcTransactionTest { } @Test - public void flush() { + public void testFlush() { MdcTransaction trans = MdcTransaction.newTransaction() .setRequestId(null) @@ -194,7 +194,7 @@ public class MdcTransactionTest { } @Test - public void metric() { + public void testMetric() { MdcTransaction trans = MdcTransaction.newTransaction(null, null).metric(); @@ -202,7 +202,7 @@ public class MdcTransactionTest { } @Test - public void transaction() { + public void testTransaction() { MdcTransaction trans = MdcTransaction.newTransaction(null, null).transaction(); @@ -210,7 +210,7 @@ public class MdcTransactionTest { } @Test - public void subTransaction() { + public void testSubTransaction() { MdcTransaction trans = MdcTransaction.newTransaction(null, "partner"); diff --git a/pom.xml b/pom.xml index d9160ba0..2c1c174d 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ org.onap.policy.parent integration - 3.1.0 + 3.1.1-SNAPSHOT @@ -39,10 +39,6 @@ The ONAP Policy Engine drools-based PDP Project - - 1.8 - 1.8 - https://nexus.onap.org /content/sites/site/${project.groupId}/${project.artifactId}/${project.version} @@ -63,8 +59,8 @@ 5.0.1.Final 2.5 1.4.01 - 1.6.1 - 2.2.0 + 1.6.2-SNAPSHOT + 2.2.1-SNAPSHOT @@ -171,7 +167,7 @@ with minor changes --> onap-checkstyle/onap-java-style.xml - ${project.build.sourceDirectory} + ${project.build.sourceDirectory} true true true -- cgit 1.2.3-korg