aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actor.appclcm
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/actors/actor.appclcm')
-rw-r--r--controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java4
-rw-r--r--controlloop/common/actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmServiceProviderTest.java15
2 files changed, 10 insertions, 9 deletions
diff --git a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
index c370f153f..1d4af389f 100644
--- a/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
+++ b/controlloop/common/actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
@@ -299,7 +299,7 @@ public class AppcLcmActorServiceProvider implements Actor {
return new AbstractMap.SimpleEntry<>(PolicyResult.FAILURE_EXCEPTION, message);
}
- /* Save the APPC response's message for Policy noticiation message. */
+ /* Save the APPC response's message for Policy notification message. */
message = appcResponse.getStatus().getMessage();
/* Maps the APPC response result to a Policy result. */
@@ -326,7 +326,7 @@ public class AppcLcmActorServiceProvider implements Actor {
* This method reads and validates environmental properties coming from the policy engine. Null
* properties cause an {@link IllegalArgumentException} runtime exception to be thrown
*
- * @param string the name of the parameter to retrieve
+ * @param enginePropertyName the name of the parameter to retrieve
* @return the property value
*/
private static String getPeManagerEnvProperty(String enginePropertyName) {
diff --git a/controlloop/common/actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmServiceProviderTest.java b/controlloop/common/actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmServiceProviderTest.java
index 48c613dce..f6131b135 100644
--- a/controlloop/common/actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmServiceProviderTest.java
+++ b/controlloop/common/actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmServiceProviderTest.java
@@ -22,6 +22,7 @@ package org.onap.policy.controlloop.actor.appclcm;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import java.time.Instant;
@@ -52,15 +53,15 @@ import org.onap.policy.simulators.Util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
public class AppcLcmServiceProviderTest {
private static final Logger logger = LoggerFactory.getLogger(AppcLcmServiceProviderTest.class);
- private static VirtualControlLoopEvent onsetEvent;
- private static ControlLoopOperation operation;
- private static Policy policy;
- private static LcmRequestWrapper dmaapRequest;
- private static LcmResponseWrapper dmaapResponse;
+ private static final VirtualControlLoopEvent onsetEvent;
+ private static final ControlLoopOperation operation;
+ private static final Policy policy;
+ private static final LcmResponseWrapper dmaapResponse;
static {
/*
@@ -99,7 +100,7 @@ public class AppcLcmServiceProviderTest {
policy.setTimeout(300);
/* A sample DMAAP request wrapper. */
- dmaapRequest = new LcmRequestWrapper();
+ LcmRequestWrapper dmaapRequest = new LcmRequestWrapper();
dmaapRequest.setCorrelationId(onsetEvent.getRequestId().toString() + "-" + "1");
dmaapRequest.setRpcName(policy.getRecipe().toLowerCase());
dmaapRequest.setType("request");
@@ -224,7 +225,7 @@ public class AppcLcmServiceProviderTest {
dmaapResponse.getBody().getStatus().setCode(100);
dmaapResponse.getBody().getStatus().setMessage("ACCEPTED");
result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
- assertEquals(null, result.getKey());
+ assertNull(result.getKey());
/* If APPC is successful, PolicyResult is success */
dmaapResponse.getBody().getStatus().setCode(400);