diff options
Diffstat (limited to 'controlloop/m2')
-rw-r--r-- | controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java | 3 | ||||
-rw-r--r-- | controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java index c5fa6befd..9158a6f52 100644 --- a/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java +++ b/controlloop/m2/base/src/test/java/org/onap/policy/m2/base/TransactionTest.java @@ -20,6 +20,7 @@ package org.onap.policy.m2.base; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; @@ -320,6 +321,7 @@ public class TransactionTest { public void testSetNotificationMessage() { Transaction transaction = new Transaction(mockWorkingMemory, CL_NAME, UUID.randomUUID(), createControlLoop()); transaction.setNotificationMessage("test"); + assertEquals("test", transaction.getNotificationMessage()); } @Test @@ -345,6 +347,7 @@ public class TransactionTest { GuardAdjunct adjunct2 = new GuardAdjunct(); transaction.putAdjunct(adjunct2); transaction.cleanup(); + assertThatCode(() -> transaction.cleanup()).doesNotThrowAnyException(); } private VirtualControlLoopEvent createControlLoopEvent(UUID requestId, String closedLoopControlName, diff --git a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java index c76a8c244..0d60b2598 100644 --- a/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java +++ b/controlloop/m2/util/src/main/java/org/onap/policy/util/DroolsSessionCommonSerializable.java @@ -78,7 +78,7 @@ public class DroolsSessionCommonSerializable implements Serializable { * @return the local named object (if available), or the deserialized * object */ - private Object readResolve() throws ObjectStreamException { + protected Object readResolve() throws ObjectStreamException { Adjunct adjunct = getAdjunct(); Object replacementObject; |