aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-25 22:53:45 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-26 00:23:48 +0100
commite69d7e19bf99a5ac575705f7a1a9375417b0990f (patch)
tree342d5675d5e35373b5f6cd83fc3f12aa77cc0a67 /core
parenta122dde3b18f7c90098174be1c997d34d1f82853 (diff)
Add JUnit for engine service
Although the Apex engine service is called by the policy engine tests and the various interface tests, the test coverage on these classes is not showing up in Sonar. In any event it is better that specific JUint is done for them. Issue-ID: POLICY-1034 Change-Id: I0028c7e5e870c18649870536cf3691fce2ab689c Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'core')
-rw-r--r--core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
index 022617864..efd6aec5e 100644
--- a/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
+++ b/core/core-engine/src/main/java/org/onap/policy/apex/core/engine/engine/impl/ApexEngineImpl.java
@@ -408,6 +408,10 @@ public class ApexEngineImpl implements ApexEngine {
public Map<AxArtifactKey, Map<String, Object>> getEngineContext() {
final Map<AxArtifactKey, Map<String, Object>> currentContext = new LinkedHashMap<>();
+ if (internalContext == null) {
+ return currentContext;
+ }
+
for (final Entry<AxArtifactKey, ContextAlbum> contextAlbumEntry : internalContext.getContextAlbums()
.entrySet()) {
currentContext.put(contextAlbumEntry.getKey(), contextAlbumEntry.getValue());