diff options
author | liamfallon <liam.fallon@est.tech> | 2020-09-03 13:32:01 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2020-09-03 15:40:06 +0100 |
commit | 386d8b15efd66cbd176e9911806c55a437cc6376 (patch) | |
tree | 0ea6603a5cfd1ee24721a63e494ef48ffedb6b23 /plugins/plugins-executor/plugins-executor-mvel | |
parent | 6f154bcd5c86bf9027d297df8cbdb8310eb88754 (diff) |
Clean up warnings and SONAR issues
Issue-ID: POLICY-2654
Change-Id: Ifd391ea9141d37cfd3ca4110d66c667962230ae1
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-mvel')
-rw-r--r-- | plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java index 2cd19c6f6..4dd400bbc 100644 --- a/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java @@ -47,17 +47,12 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; import org.onap.policy.apex.model.policymodel.concepts.AxState; import org.onap.policy.apex.model.policymodel.concepts.AxStateFinalizerLogic; import org.onap.policy.common.parameters.ParameterService; -import org.slf4j.ext.XLogger; -import org.slf4j.ext.XLoggerFactory; /** * Test the MvelStateFinalizerExecutor class. * */ public class MvelStateFinalizerExecutorTest { - - private static final XLogger LOGGER = XLoggerFactory.getXLogger(MvelStateFinalizerExecutorTest.class); - /** * Initiate Parameters. */ @@ -85,8 +80,7 @@ public class MvelStateFinalizerExecutorTest { MvelStateFinalizerExecutor msfe = new MvelStateFinalizerExecutor(); assertNotNull(msfe); - assertThatThrownBy(msfe::prepare) - .isInstanceOf(java.lang.NullPointerException.class); + assertThatThrownBy(msfe::prepare).isInstanceOf(java.lang.NullPointerException.class); ApexInternalContext internalContext = null; internalContext = new ApexInternalContext(new AxPolicyModel()); @@ -100,8 +94,7 @@ public class MvelStateFinalizerExecutorTest { msfe.setContext(parentStateExcutor, stateFinalizerLogic, internalContext); stateFinalizerLogic.setLogic("x > 1 2 ()"); - assertThatThrownBy(msfe::prepare) - .hasMessage("failed to compile MVEL code for state NULL:0.0.0:NULL:NULL"); + assertThatThrownBy(msfe::prepare).hasMessage("failed to compile MVEL code for state NULL:0.0.0:NULL:NULL"); stateFinalizerLogic.setLogic("java.lang.String"); msfe.prepare(); @@ -117,9 +110,9 @@ public class MvelStateFinalizerExecutorTest { assertThatThrownBy(() -> msfe.execute(-1, new Properties(), event)) .hasMessage("execute-post: state finalizer logic execution failure on state \"NULL:0.0.0:" + "NULL:NULL\" on finalizer logic NULL:0.0.0:NULL:NULL"); - stateFinalizerLogic.setLogic( - "if (executionId == -1) {return false;}setSelectedStateOutputName(\"SelectedOutputIsMe\");" - + "return true;"); + stateFinalizerLogic + .setLogic("if (executionId == -1) {return false;}setSelectedStateOutputName(\"SelectedOutputIsMe\");" + + "return true;"); state.getStateOutputs().put("SelectedOutputIsMe", null); msfe.prepare(); |