aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/test/java/org')
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/SynchronousEventCacheTest.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/SynchronousEventCacheTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/SynchronousEventCacheTest.java
index 068880a9d..dd960b298 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/SynchronousEventCacheTest.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/SynchronousEventCacheTest.java
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021. Nordix Foundation.
+ * Modifications Copyright (C) 2021 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.
@@ -138,11 +139,12 @@ public class SynchronousEventCacheTest {
final SynchronousEventCache cache =
new SynchronousEventCache(EventHandlerPeeredMode.SYNCHRONOUS, consumer, producer, timeout);
- assertThatCode(() -> {
- cache.cacheSynchronizedEventFromApex(executionId, new Object());
- cache.cacheSynchronizedEventFromApex(executionId, new Object());
- })
- .isInstanceOf(ApexEventRuntimeException.class);
+ final var obj1 = new Object();
+ cache.cacheSynchronizedEventFromApex(executionId, obj1);
+
+ final var obj2 = new Object();
+ assertThatCode(() -> cache.cacheSynchronizedEventFromApex(executionId, obj2))
+ .isInstanceOf(ApexEventRuntimeException.class);
}
@Test